I am trying to setup a very simple nginx config to serve static content. Here is my configuration setting. I get HTTP 500 whenever I try to access a non-existant file instead of a 404. Please let me know what am I doing wrong?
2012/12/21 11:15:14 [error] 1906#0: *41 rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 127.0.0.1, server: i.domain.com, request: "GET /favicon.ico HTTP/1.1", host: "i.domain.com"
server {
listen 127.0.0.1:81; ## listen for ipv4; this line is default and implied
root /project/;
index index.html index.htm;
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
access_log off;
log_not_found off;
expires 360d;
}
server_name i.domain.com;
location / {
try_files $uri $uri/ /index.html;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
}