NGINX server_name issues

Posted by Unai on Server Fault See other posts from Server Fault or by Unai
Published on 2011-11-29T03:23:40Z Indexed on 2011/11/29 9:52 UTC
Read the original article Hit count: 356

Filed under:
|

I have the following simple server block on NGINX:

    server {
        listen 80;
        listen 8090;
        server_name domain.com;
        autoindex on;

        root /home/docroot;

        location ~ \.php$ {
            include /usr/local/nginx/conf/fastcgi_params;       
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  /home/docroot$fastcgi_script_name;
            fastcgi_pass   127.0.0.1:9000;
        }
    }

After I include the relevant settings on my hosts file I get the following (unexpected) behavior:

  1. http: //domain.com/ and http: //domain.com:8090/ work fine;
  2. http: //domain.com:8090/future-cell-phone-technology-01-150x150.jpg works;
  3. http: //domain.com/future-cell-phone-technology-01-150x150.jpg -> ERROR! "The connection was reset"

(note.- added a space after http: to avoid link protection but this is not really promoting anything)

I've been troubleshooting (3) for a couple hours and I'm unable to identify the culprit. I'm running NGINX 1.0.10 (latest stable) on Debian 6.0.2 32 bits.

This NGINX instance runs another 40 or 50 sites with no problems.

© Server Fault or respective owner

Related posts about debian

Related posts about nginx