worker process exits w/addition of rewrite rule

nginx at donsbox.com nginx at donsbox.com
Thu Sep 18 22:48:25 MSD 2008


Running 0.6.29 on Gentoo for sparc64.

When I add a rewrite rule to my server config, nginx worker exits (nothing
returned to browser).

Works:

server {
       listen          80;
       server_name     foo.example.com;

       access_log      /var/log/nginx/default.access_log main;
       error_log       /var/log/nginx/default.error_log info;

       root /var/www/default/htdocs;
}

Doesn't work:

server {
       listen          80;
       server_name     foo.example.com;

       access_log      /var/log/nginx/default.access_log main;
       error_log       /var/log/nginx/default.error_log info;

       if ($host !~* foo\.(.*)) {
               rewrite ^(.*)$ http://$server_name$1 permanent;
       }

       root /var/www/default/htdocs;
}

What I'm trying to do is redirect http://foo/ to http://foo.example.com/

error_log:

2008/09/18 14:41:47 [notice] 14244#0: using the "epoll" event method
2008/09/18 14:41:47 [notice] 14244#0: nginx/0.6.29
2008/09/18 14:41:47 [notice] 14244#0: OS: Linux 2.6.25-gentoo-r7
2008/09/18 14:41:47 [notice] 14244#0: getrlimit(RLIMIT_NOFILE): 8192:8192
2008/09/18 14:41:47 [notice] 14245#0: start worker processes
2008/09/18 14:41:47 [notice] 14245#0: start worker process 14246
2008/09/18 14:42:00 [notice] 14245#0: signal 20 (SIGCHLD) received
2008/09/18 14:42:00 [alert] 14245#0: worker process 14246 exited on signal 11
2008/09/18 14:42:00 [notice] 14245#0: start worker process 14256









More information about the nginx mailing list