Today suddenly found a problem, the site set a custom 404 page, showing no problem, just return the status code is 200, not 404! !
Go to my nginx configuration:
nginx.conf
The code is as follows server {
...
error_page 404 = /404.php;
...
}
At first glance, there is nothing wrong with it. After searching online, I know that there is an equal sign! ! ! Change to this:
nginx.conf
The code is as follows
server {
...
error_page 404 /404.php ;
...
}
Add other state code definition methods
Change nginx.conf in the http definition area to join: fastcgi_intercept_errors on;< Br>
Set a 404 page for the specified location
The code is as follows
location /my_blog { error_page 404 = /article_not_found.html; }
You can use a single Error page together to handle multiple error codes
Code is as follows
location /my_blog { error_page 500 502 503 504 = /server_error.html }
Redirect to a completely different The server, assuming you have an upstream server server2 defined in the http area:
The code is as follows
upstream server2 { server 10.0.0.1:80; } server { location /my_blog { error_page 404 = @ Try_server2; } location @try_server2 { proxy_pass http://server2; }
This feature can be used in the server architecture of the Nginx front end + Apache backend.
Test Configuration
/usr/local/nginx/sbin/nginx -t
Restart nginx without error [
/etc/init.d/Nginx restart
These two days were tossed by the server, and the program in the event viewer kep
When deploying the WCF server in the IIS server in Windows Server 2008, the following error is repor
Dynamic feedback load balancing algorithm considers the real-time load and respon
server perfect settings, support asp php cgi jsp asp.net mysql! First download the program we want
phpMyAdmin appears blank solution
Considerations for server cluster high availability
Detailed Configuration and Deployment of WSUS Server
The reason the shared server is unstable or slow to open
How to build a solid server virtualization architecture?
Misuse of the server and proper use
Win2003 load balancing setting method (more detailed)
Blank password causes remote connection Server2008 failure
Several ways for firewalls to prevent DDOS distributed denial of service attacks
Thin provisioning technology solves the problem of wasted disk space
Microsoft said that it wants to rebuild the operating system through Windows 8
Quickly determine if the computer can successfully install the Windows 7 operating system
Win10 Store allows batch purchase of applications and provision of private areas
Microsoft announced Win10 minimum configuration requirements Experts said it is very "grounded"
Notebook win7 system computer in the BIOS to correct the battery
Teach you how to set up the W8 Camera
Power saving continuous network computer power saving skills under win7
How to set video download quality for Win10 video application
Windows verifies the activation Trojan and proposes a solution