50x.html必须要放到/usr/local/openresty/nginx/html目录下吗?
来源:4-7 配置nginx反向代理

飞着的鱼
2019-07-18
按照老师的配置,把50x.html也一同放到了resources目录下,但是请求http://miaoshaserver/resources/getotp.html时,页面没有跳转,通过查看nginx的logs/error.log,有如下报错:
2019/07/18 15:04:20 [error] 26891#0: *65 open() "/usr/local/openresty/nginx/html/50x.html" failed (2: No such file or directory), client: 36.110.87.173, server: localhost, request: "POST /user/getotp HTTP/1.1", upstream: "http://172.26.xx.xx:8080/user/getotp", host: "miaoshaserver", referrer: "http://miaoshaserver/resources/getotp.html"
按照提示,把50x.html放到了/usr/local/openresty/nginx/html目录下,能正常跳转
问下老师,这个50x.html必须要放到/usr/local/openresty/nginx/html目录下吗?怎么配置到其它目录下?
写回答
1回答
-
修改location 对500错误指定处理到对应的目录
012019-07-18
相似问题