0
1

More than 3 years have passed since last update.

CentOS8でApacheとTomcatをアッという間に連携させる

Last updated at Posted at 2020-08-12

概要

定番ネタ

環境

  • 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のホーム画面が見えるはずだ。

参考

0
1
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
0
1