search

Home  >  Q&A  >  body text

How to configure nginx custom 500 page

nginx How to configure a custom 500 page

PHP中文网PHP中文网2746 days ago750

reply all(3)I'll reply

  • 某草草

    某草草2017-05-16 17:31:32

    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...

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-16 17:31:32

    Find the default 500 page and change it

    reply
    0
  • 世界只因有你

    世界只因有你2017-05-16 17:31:32

    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

    reply
    0
  • Cancelreply