Answer the question
In order to leave comments, you need to log in
How to force nginx+php-fpm to return default 404 wordpress page?
The sheaf all time gives static.
I use try_files $uri =404; in the location about php
Apparently it is necessary to somehow correctly register error_page 404
Answer the question
In order to leave comments, you need to log in
An easier way is to let WP return errors itself:
try_files $uri $uri/ /index.php$is_args$args;
If there is fastcgi_intercept_errors on; then the error with fpm will be replaced with its own with the response code 404. But if you write error_page 404 /404.html; then you need this file to be in root for location, otherwise it will return 404 for 404.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question