P
P
Puma Thailand2013-03-23 14:45:31
WordPress
Puma Thailand, 2013-03-23 14:45:31

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

3 answer(s)
I
iStyx, 2013-03-23
@iStyx

An easier way is to let WP return errors itself:
try_files $uri $uri/ /index.php$is_args$args;

S
sylord, 2013-03-23
@sylord

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.

I
iStyx, 2013-03-23
@iStyx

http://nginx.org/ru/docs/http/ngx_http_core_module.html#error_page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question