Welcome! Log In Create A New Profile

Advanced

Re: Why is NGINX serving a 404 here?

August 30, 2015 09:40PM
Just a quick look but I noticed this:

`root /var/www/index.html`

I guess you wanted `root /var/www/` !?

Also looking at the logs should probably hint on why the 404 is happening,
but I'm guessing its realted to the above line :)


Melhores Cumprimentos // Best Regards
-----------------------------------------------
*Miguel Clara*
*IT - Sys Admin & Developer*

On Mon, Aug 31, 2015 at 1:54 AM, maplesyrupandrew <nginx-forum@nginx.us>
wrote:

> 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 127.0.0.1:3000;
> }
>
> 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
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Why is NGINX serving a 404 here?

maplesyrupandrew August 30, 2015 08:54PM

Re: Why is NGINX serving a 404 here?

mike-pt August 30, 2015 09:40PM

Re: Why is NGINX serving a 404 here?

maplesyrupandrew September 02, 2015 01:32PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 145
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready