NGINX server_name issues
- by Unai
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:
http: //domain.com/ and http: //domain.com:8090/ work fine;
http: //domain.com:8090/future-cell-phone-technology-01-150x150.jpg
works;
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.