LoginSignup
1
0

More than 3 years have passed since last update.

【俺得】【ApacheとTomcat連携】 エラードキュメントをApacheで表示させてみた。

Last updated at Posted at 2019-09-18

設定箇所

httpd.confにて設定
基本的な設計としてクライアントからきたアクセスをTomcatへ全て流す設計だが、
404エラーが発生した場合に限り、
Apache側で静的コンテンツを表示できる様にProxyPass /error/error.html !で除外設定をしている。

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

ErrorDocument 404 /error/error.html
DocumentRoot /var/www/html

ProxyPass /error/error.html !
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/



1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0