segmentation fault with include and virtual hosts

Manlio Perillo manlio_perillo at libero.it
Mon Apr 16 22:31:21 MSD 2007


Hi.

I'm using nginx 0.5.13, with Debian Etch (the package from testing).

I'm tryng to organize my configuration files using the
sites-available/sites-enabled directories.

Here is the main config file (nginx.conf):

user www-data;
worker_processes  1;

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

events {
     use epoll;
     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;
}

include /etc/nginx/sites-enabled/*;



When I include two virtual host:

sites-available/1:

http {
     server {
         listen       80;
         server_name  localhost;

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

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

         #error_page  404              /404.html;

         # redirect server error pages to the static page /50x.html
         #
         error_page   500 502 503 504  /50x.html;
         location = /50x.html {
             root   /var/www/nginx-default;
         }
     }
}

sites-available/2:
http {
     server {
         listen       80;
         server_name  munin.localhost;

         location / {
             root /var/www/munin/;
             autoindex on;
         }
     }
}

I got a:

Starting nginx: /etc/init.d/nginx: line 27: 22905 Segmentation fault 
   start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid --exec 
$DAEMON -- $DAEMON_OPTS


This does not happen if I put the include inside the http directive (and 
removing the http directive from the sub configuration files).



Thanks and regards  Manlio Perillo





More information about the nginx mailing list