참고 : http://serverfault.com/questions/511109/nginx-local-fallback-error-page-if-proxy-destination-is-unavailable Nginx 에서 리버스 프록시 설정을 하여 사용할때 에러 페이지의 경우는 Nginx 설정이 아닌 프록시 서버의 설정을 따르게 된다. (Nginx - Tomcat 설정인 경우 Tomcat 에러 페이지가 노출) 이때 Nginx 에서 에러 페이지를 설정하기 위해서는 아래의 옵션을 함께 사용하면 된다. (Server 블록 내에서 사용) server { ... location / { proxy_intercept_errors on; proxy_pass http://localhost:8080/; } error_page..
Read More[NGINX] Reverse Proxy 설정 시 Nginx 에서 Error Page 설정
Nginx 에서 리버스 프록시 설정을 하여 사용할때 에러 페이지의 경우는 Nginx 설정이 아닌
프록시 서버의 설정을 따르게 된다. (Nginx - Tomcat 설정인 경우 Tomcat 에러 페이지가 노출)
이때 Nginx 에서 에러 페이지를 설정하기 위해서는 아래의 옵션을 함께 사용하면 된다.
(Server 블록 내에서 사용)
server {
...
location / {
proxy_intercept_errors on;
proxy_pass http://localhost:8080/;
}
error_page 404 500 502 503 504 /custom_error.html;
location = /custom_error.html {
root /usr/share/nginx/html;
internal;
}
...
}
Discuss about post