본문 바로가기
WEB/APACHE

22. 작업 중 페이지 설정(ErrorDocument)

by coldplayer83 2025. 12. 23.
728x90
반응형

web - was 연동 환경에서 was 시스템 작업으로 인해 was 중지시 web에서 커스텀 503 에러페이지를 띄우는 방법

 

커스텀 에러페이지(503.html, 1366_logo.png) 파일을 DocumentRoot에 위치 (권한 확인)
vhost.conf에 다음과 같이 설정

<VirtualHost *:80>
    ServerName 192.168.56.101
    DocumentRoot /GCLOUD/APACHE/jbcs-httpd24-2.4/httpd/www

    JkMount /* D
    JkUnMount /503.html D
    JkUnMount /*.png D

    ErrorDocument 503 /503.html

    ErrorLog "|/GCLOUD/APACHE/jbcs-httpd24-2.4/httpd/sbin/rotatelogs logs/ssl_error_log_%Y%m%d 86400"
    CustomLog "|/GCLOUD/APACHE/jbcs-httpd24-2.4/httpd/sbin/rotatelogs logs/ssl_request_log_%Y%m%d %t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" combined
</VirtualHost>

 

 

JkMount /* D : 모든 요청을 was로 넘김. was 중지된 상태 -> 503

ErrorDocument 503 /503.html : 503 상태일 때 커스텀 에러페이지 띄우기

JkUnMount /503.html D : 503.html은 was로 넘기지 않음
JkUnMount /*.png D : 503.html에 포함된 png 파일도 was로 넘기지 않음

 

728x90
반응형

'WEB > APACHE' 카테고리의 다른 글

23. ssl 인증서 암호 해제  (0) 2025.12.23
21. 디렉토리 리스팅(directory listing)  (0) 2025.12.15
20. forward proxy 설정  (0) 2025.12.03
19. reverse proxy 설정(=gateway server)  (0) 2025.12.03
18. proxy  (0) 2025.12.03