Behavior of server depends on a file name

Gregor Jurgele gregor.jurgele at
Fri Sep 12 12:59:47 MSD 2008


I would like to run a few virtual sites on one IP on nginx 0.6.32 compiled
from source as Debian package on Debian Etch.

My nginx.conf contents are:

user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/;

events {
    worker_connections  1024;

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

    access_log  /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
    tcp_nodelay        on;

    gzip  on;

    server_tokens     off;

    include /etc/nginx/conf.d/*.conf;
    include /etc/nginx/sites-enabled/*;

My virtual site file ( contents are:

server {
        listen   80;

        access_log  /var/log/nginx/;

        location / {
                root   /var/www/;
                index  default.html default.htm index.html index.htm;

        # pass the PHP scripts to FastCGI server listening on
        #location ~ \.php$ {
                #fastcgi_index  index.php;
                #fastcgi_param  SCRIPT_FILENAME

If I name a file or symbolic link in /etc/nginx/sites-enabled/, that holds
the information for a virtual site,, this site becomes a
catch-all site, answering all requests that go to the same ip and do not
match any of the sites defined in other files in /etc/nginx/sites-enabled/.

Same is if I replace -a with - followed by any letter between b and d
(including). If I name the file or, everything
works fine and i get 403 Forbidden as a reply.

What am I doing wrong?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list