Skip to content

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

  • root or alias pointing at the wrong folder, or alias used where root was 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 location block than intended.

How to fix it

  1. 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.
  2. Add the try_files line your app needs.
  3. 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.

Check only sites you run or have permission to check.

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.