[Wylug-help] NGINX

Richard Ibbotson richard.ibbotson at gmail.com
Tue Feb 11 17:00:55 UTC 2014


On Tuesday 11 Feb 2014 16:33:31 Simon Greenwood wrote: 
> Without any specifics it's hard to tell but remember that nginx
> doesn't support .htaccess files and that you have to map URLs to
> your pages in a configuration file or with URL handlers in your
> code.

I was able to work that out for myself.  As far as I am able to 
understand I need to add a few lines for each URL.  Such as /blog or 
/home.  I did try this but NGINX didn't like it.  Wouldn't start..... 
Pobably a few { and } missing in here which I've forgotten to put into 
this post...

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;   
        tcp_nopush on; 
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log;
}

# Server (www.)mydomain.com
server  { 
listen 80;
server_name www.sleepypenguin.homelinux.org 
sleeyppenguin.homelinux.org;blog / {
root /var/www/; index index.html index.htm php.html;
}
}

And later ...

     listen      127.0.0.1:80;
     root        /var/www/;
    server_name www.sleepypenguin.home.linux.org;
}

-- 
Richard



More information about the Wylug-help mailing list