Nginx
에러페이지 (404, 500, 502, 503, 504) 발생시 특정페이지로 보내기
ohrohi
2019. 11. 27. 19:58
반응형
에러페이지 (404, 500, 502, 503, 504) 발생시 특정페이지로 보내는 설정방법
vi default.conf or default_ssl.conf
server {
...
location / {
proxy_intercept_errors on;
proxy_pass http://localhost:8090/; -> 해당도메인의포트로 요청시 conf에 설정된 포트로 리다이렉팅 해주는 설정
}
error_page 404 500 502 503 504 /idnex.html;
location = /index.html {
root /index.html파일이 위치한곳;
internal;
}
이러면 설정해놓은 파일로 잘 넘어간다.
반응형