Nginx error_page custom error page setting code tutorial, nginxerror_page

Source: Internet
Author: User

Nginx error_page custom error page setting code tutorial, nginxerror_page
Nginx error_page custom error page setting code tutorial

# Fastcgi_intercept_errors on; # Syntax: fastcgi_intercept_errors on | off # default value: fastcgi_intercept_errors off # Use Field: http, server, location # This command specifies whether to pass 4xx and 5xx error messages, alternatively, nginx can use error_page to process error messages. # You must explicitly specify the processing method in error_page to make this parameter valid, as Igor says, "If no proper processing method is available, # nginx will not block an error, this error does not display its default page. You can use some methods to block the error. # If proxy_intercept_errors is on, nginx follows the original response # proxy_intercept_errors on | off # proxy_intercept_errors off # use fields: http, server, location # code output. The backend is 404, Which is 404. this variable can be used to customize the error page. Proxy_intercept_errors on; upstream dev1 {server 127.0.0.1: 8080; # HessianTest3} server {listen 80; server_name kevin.com; location/{proxy_pass https: // dev1; # HessianTest3} # reference book page 40th # error_page 404 = 200/404 .html; # error_page 500 502 503 = 504 x.html; # location =/404.html {# root html; ##}# location =/50x.html {# root html; #}# when a page exception occurs, you can specify to jump to location, you can also specify to jump to the specified URL above error_page 404 https://www.baidu.com /;}

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.