How to configure nginx custom 500 page
PHP中文网
PHP中文网 2017-05-16 17:29:32
0
3
749

nginx How to configure a custom 500 page

PHP中文网
PHP中文网

认证0级讲师

reply all(3)
某草草

ls What’s the answer?
Does modifying the default page count as customization?

Several ways:

  • Modify location:
location /my_blog {
    error_page    404 = /blog_article_not_found.html;
}
  • Modify web site
server {
    listen 80;
    error_page  404  /website_page_not_found.html;
    ...
  • Several errors on the same page
location /my_blog {
    error_page 500 502 503 504 = /server_error.html
}

Source:
http://stackoverflow.com/questions/10...

我想大声告诉你

Find the default 500 page and change it

世界只因有你

I would like to add to the criticism above, why don’t you go to the official website to check out nginx, an artifact with such a large number of users:
http://wiki.nginx.org/HttpCoreModule

Check the navigation column on the right, you will find everything you want, of course you want it; error_page must also be there

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template