Why is NGINX serving a 404 here?

maplesyrupandrew nginx-forum at nginx.us
Mon Aug 31 00:54:15 UTC 2015

I have a pretty standard test nginx configuration file
(/etc/nginx/sites-available/default) that was configured to serve a sample
html document.

Here's the modified portion of the configuration file.

upstream auth{

server {
        listen 80 default_server;

        root /var/www/index.html;

        # Make site accessible from http://localhost/
        server_name _;

        location / {
                try_files $uri $uri/ =404;

        location /auth{
                proxy_pass http://auth;

And yet, accessing my machine's IP address seems to return a 404. What's
going on here?

I've ensured that the permissions of index.html ensure that the file is
readable, so doesn't seem to be a permissions issue.

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,261327,261327#msg-261327

More information about the nginx mailing list