Nginx add 404 page, still prompt file not found

Source: Internet
Author: User

After new configuration of a new server, Access failed, nginx configuration has 404 pages, but still reported file not found

Error_page 404 http://xxx.com/404.html;

Check the information, you need to configure a parameter in Nginx about FASTCGI:

Fastcgi_intercept_errors on;


About:

Fastcgi_intercept_errors

Syntax: Fastcgi_intercept_errors on|off

Default value: Fastcgi_intercept_errors off

Using fields: HTTP, server, location

This directive specifies whether to pass 4xx and 5xx error messages to the client, or to allow Nginx to handle error messages using Error_page.

You must specify the processing method in the Error_page to make this parameter valid, as Igor said, "If there is no proper handling method, Nginx will not intercept an error, this error will not display its own default page, which allows some methods to intercept the error."


This article is from the "OPS rookie" blog, please be sure to keep this source http://ckl893.blog.51cto.com/8827818/1682249

Nginx add 404 page, still prompt file not found

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.