How to hide apache error page when portal service is not running.

Document ID : KB000045534
Last Modified Date : 14/02/2018
Show Technical Document Details

Summary:

Avoid display of versioning info of the web server when portal service is not running.

Instructions: 


1.    Create own html error page and name it as 503.html

2.    Add 503.html file to /var/www/error

3.    Run the command chmod 644 /var/www/error

4.    Edit the httpd.conf file as below
   
# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
ProxyPass /error !
ErrorDocument 503 /error/503.html
# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

5.    Restart httpd service

Finally, now stop apiportal service and try to access the home page of the portal to see the customized error page.