The configuration is as follows: after {code...} takes effect, the following webpage dev. comu. php prompts: Filenotfound.dev.comabc.html returns the specified error page. How can this problem be solved? The configuration is as follows:
error_page 400 401 402 403 404 /40x.html;location = /40x.html { root /Library/WebServer/public_html/dev/;}
After the modification takes effect, visit the following webpage
- Http://dev.com/u.php prompt: File not found.
- The http://dev.com/abc.html returns the specified error page
What is the problem? How can this problem be solved?
Reply content:
The configuration is as follows:
error_page 400 401 402 403 404 /40x.html;location = /40x.html { root /Library/WebServer/public_html/dev/;}
After the modification takes effect, visit the following webpage
- Http://dev.com/u.php prompt: File not found.
- The http://dev.com/abc.html returns the specified error page
What is the problem? How can this problem be solved?
(1) Check fastcgi in the server moduleInterceptWhether errors is enabled or not.
fastcgi_intercept_errors on;
(2) check whether the location matches the 40x root directory with the 404 page and the permission configuration.
(3) Whether to reload or restart the nginx server after the configuration is complete
(4) nginx itself cannot parse php, so you need to use the fastcgi proxy to parse the php file for fpm. If I don't write the specific configuration, google will do it.
(5) The php script error may be a 50x error, which is not defined in your error_page.