After new configuration of a new server, Access failed, nginx configuration has 404 pages, but still reported file not found
Error_page 404 http://xxx.com/404.html;
Check the information, you need to configure a parameter in Nginx about FASTCGI:
Fastcgi_intercept_errors on;
About:
Fastcgi_intercept_errors
Syntax: Fastcgi_intercept_errors on|off
Default value: Fastcgi_intercept_errors off
Using fields: HTTP, server, location
This directive specifies whether to pass 4xx and 5xx error messages to the client, or to allow Nginx to handle error messages using Error_page.
You must specify the processing method in the Error_page to make this parameter valid, as Igor said, "If there is no proper handling method, Nginx will not intercept an error, this error will not display its own default page, which allows some methods to intercept the error."
This article is from the "OPS rookie" blog, please be sure to keep this source http://ckl893.blog.51cto.com/8827818/1682249
Nginx add 404 page, still prompt file not found