概要
定番ネタ
環境
- CentOS 8.2
- http 2.4
- tomcat 8.0
前提
apache, tomcatの設定は終わっているものとします。
- apacheの設定ファイル:/etc/httpd/conf
- tomcatの設定ファイル:/usr/java/tomcat8/conf
手順
以下設定ファイルを作成。とりあえず全部転送で。
/etc/httpd/conf.d/proxy.conf
ProxyPass / ajp://localhost:8009/
以下を実行(おまじない)
/usr/sbin/setsebool -P httpd_can_network_connect 1
8080をつぶすため以下コメントオフ
/usr/java/tomcat8/conf/server.xml
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
-->
Tomcat再起動
systemctl restart tomcat
URL:http://[IPアドレス]/ でtomcatのホーム画面が見えるはずだ。