Errors / HTTP errors
404 Not Found nginx
nginx looked for the page on disk, where the configuration says, and it is not there.
Every page but some, or a whole section, is a dead end.
Seeing it on someone else’s site?
- The address may be wrong or out of date; try the site's home page.
Why it happens, if it is your site
rootoraliaspointing at the wrong folder, oraliasused whererootwas meant (they join paths differently).- A single-page app without
try_files $uri $uri/ /index.html;, so any address but the home page is a 404 on reload. - WordPress or another PHP app without
try_files $uri $uri/ /index.php?$args;, so pretty permalinks 404. - The request matched a different
locationblock than intended.
How to fix it
- The error log's
open() "/path" failed (2: No such file or directory)shows the exact path nginx tried; compare it with where the file is. - Add the
try_filesline your app needs. - Test with
nginx -t, reload, and request the path again.
Whose problem it is
Usually the server that answers the request.
Does your site have it?
Free, no account. We open your page and four more in a clean Chrome and list every error like this one, with the page and the click that caused it. How the free page check works.
Often seen with
- 404 Not FoundThe server has nothing at this address: a page or file that was moved, deleted, or never existed.
- 403 Forbidden (nginx)nginx found the path but is not allowed to serve it.