Thursday, February 12, 2015

Nginx Installation on Ubuntu giving 500 error

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
}

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...