location = /50x.html {
root html;
}
}
#这边可以有多个server块
server {
...
}
}
然后,将下面的代码放入server块即可。
其中:`suibianshudianshenme` 是可以自定义的,最好配置随机字符,防止外部访问。
最后一行以端口号8000为例子,自己可以根据实际情况进行修改。
后端错误页面过滤
proxy_intercept_errors on;
301 跳转过滤,为了区别后端代理服务器的跳转和 Nginx 本身的跳转
error_page 301 /suibianshudianshenme/location?location?location?

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



