Nginx Installation on Ubuntu giving 500 error

Posted by user750301 on Server Fault See other posts from Server Fault or by user750301
Published on 2012-08-29T03:49:04Z Indexed on 2012/10/17 5:09 UTC
Read the original article Hit count: 521

Filed under:
|

I just installed nginx on ubuntu 12.04 LTS. When i access localhost it gives me :

500 Internal Server Error nginx/1.2.3

error_log has following

rewrite or internal redirection cycle while internally redirecting to "/index.html", client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"

This is default nginx configuration: nginx.conf has:

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

/etc/nginx/sites-enabled/default has following

    root /usr/share/nginx/www;
    index index.html index.htm;

    # Make site accessible from http://localhost/
    server_name localhost;
    location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to displaying a 404.
            try_files $uri $uri/ /index.html;
            # Uncomment to enable naxsi on this location
            # include /etc/nginx/naxsi.rules
    }

© Server Fault or respective owner

Related posts about ubuntu

Related posts about nginx