Pages under main page not loading with Nginx

Francis Daly francis at
Thu Jul 20 21:20:05 UTC 2017

On Wed, Jul 19, 2017 at 06:02:16PM -0400, Kayla Manchette wrote:

Hi there,

> I have pointed Nginx at the folder where
> all the files for my website are located, and Nginx will show the
> main page just fine. When I try to go to another page on my website,
> it cannot tell where those files are. I just receive a 404 not found
> error.

What one request do you make that gives a 404?

(It should be in the nginx logs.)

What file on the filesystem do you want nginx to return, instead of
that 404?

> The main page is an html file and the rest are php files. Does that
> have something to do with it?

> 	location ~ \.php$ {
> 		fastcgi_pass;
> 		include fastcgi_params;
> 	}

Does that fastcgi_params file include SCRIPT_FILENAME? If not, you may
need to include some appropriate variant of "fastcgi_param SCRIPT_FILENAME
$request_filename;" within that location{}.

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list