Return custom 403 error page with nginx

前端 未结 4 2061
星月不相逢
星月不相逢 2021-01-04 19:27

Im trying to display the error page in /temp/www/error403.html whenever a 403 error occurs.

This should be whenever a user tries to access the site via https (ssl) a

4条回答
  •  梦毁少年i
    2021-01-04 20:01

    It looks like there's a boo-boo in the listed configuration, as it is only sending error code 503 ("service unavailable") to the custom page, so for 403 ("forbidden") you probably want to use:

    error_page 403 /error403.html
    

提交回复
热议问题