Nginx supports 404 public welfare services to help children go home

Source: Internet
Author: User
The 404 page is now at midnight 01:39. Here we want to popularize 404 public welfare activities. When the website you are visiting has a problem or the user tries to access a non-existent page, the server (nginx) will return an error message with the Status Code 404, the corresponding page is the 404 page. The default 404 content of nginx server is 404 not found! 404 public welfare I think that when I encounter a 404 error, I should not simply present an insignificant page. It happened that QQ had engaged in 404 public welfare activities, and I am happy to help my children go home. Sometimes the technical progress of a person makes himself happy, but the true public welfare will make people satisfied. Add a 404 public welfare link: (1)download the 404.html page from the 404public welfare chain
(2) Change the website virtual host configuration file that nginx listens to, and add it in the server definition area.
    1. Fastcgi_intercept_errors on;
    2. Error_page 404 =/404.html;
    3. Editing the location definition area supports 404 page rendering.
 
#404 public welfare fastcgi_intercept_errors on; error_page 404 =/404.html; location =/404.html {root/public_404/html ;}
(3) Reload nginx good contact support 404 public welfare good contact and official website good contact product website

Parameter description (1) fastcgi_intercept_errors: This directive
Determines whether or not to transfer 4xx and 5xx errors back to the client or to allow nginx to answer with Directive error_page.

(2) error_page:The directive specifies the URI
That will be shown for the errors indicated.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.