Question

How to fix 404 not found nginx problem?

I run Nginx on my wordpress site, but now all pages and categories, except homepage, suddenly appear “404 not found, Nginx”, the permalinks are correct and i don’t do anything before such problem occur. How can i troubleshoot and fix this problem?

Thank you!

Subscribe
Share

Hi!

In order to be able to help you, please post your nginx server block config (usually /etc/nginx/sites-enabled/file.conf) and the last few lines of Nginx’s error log:

sudo tail -n 20 /var/log/nginx/error.log

i have same problem 2017/06/07 06:18:44 [error] 21807#21807: *4 open() “/srv/roi/app/webroot/50x.html” failed (2: No such file or directory), client: 91.230.47.3, server: www.138.197.105.108, request: “GET / HTTP/1.0”, upstream: “fastcgi://unix:/var/run/php5-fpm.sock”


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I change my admin url to the ip and when I try using the link https://14.*******.-world-admin

It gives me white page with page not found, how do I fix this?

I change my admin url to the ip and when I try using the link https://14.*******.-world-admin

It gives me white page with page not found, how do I fix this?

"How to fix 404 not found nginx problem? " Easy to solve -app.module.ts–

Import :- import { HashLocationStrategy, LocationStrategy } from ‘@angular/common’;

@NgModule:-

providers: [ {provide: LocationStrategy, useClass: HashLocationStrategy}

],

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)

Change the line in the location block to:

try_files $uri $uri/ /index.php?q=$uri&$args;

and reload nginx

sudo systemctl reload nginx

All should be well :)