404 errors are errors that are prone to the WWW site access.
The most common error hint: 404 Not FOUND. 404 error page settings on the site SEO has a great impact, and improper settings, such as direct to jump home, etc., will be the search engine down the right to pull hair. 404 The purpose of the page should be to tell the user: the page you requested is not there, and also guide the user to browse the site other pages instead of closing the window to leave. The search engine uses the HTTP status code to identify the state of the page. When the search engine gets a bad link, the site should return a 404 status code that tells the search engine to discard the index of the link. If a 200 or 302 status code is returned, the search engine will index the link, resulting in a number of different links pointing to the same page content. As a result, search engines have significantly reduced trust in websites.
First open the Nginx.conf file and fastcgi_temp_file_write_size 128k;
add the following
fastcgi_intercept_errors on;
(note, including ;
number)
And then in the site that needs to be defined (the author's file is the /alidata/server/nginx/conf/vhosts
directory of the lbinin.conf file)
root /alidata/www/lbinin;
under Adderror_page 404 = /404.html;
(/404.html indicates that the custom 404.html is placed in the server root directory)
Similarly, to add a 403 page, the code is:error_page 403 = /403.html;
Then save and restart Nginx.
Nginx start, stop, restart under Linux
/etc/init.d/nginx start/stop/restart/reload
For example, start Nginx:
/etc/init.d/nginx start
'). addclass (' pre-numbering '). Hide (); $ (this). addclass (' has-numbering '). Parent (). append ($numbering); for (i = 1; i <= lines; i++) {$numbering. Append ($ ('
'). Text (i)); }; $numbering. FadeIn (1700); }); });
The above describes the Nginx custom 404 page (configuration under the Linux environment), including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.