Tomcat AJP
Configure Tomcat to listen for requests from Apache
-
Make sure that the following line in server.xml is uncommented.
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
-
If you needed to uncomment it, save the file, and then restart Tomcat for the changes to take effect.
sudo service tomcat restart
Configure JK module for Apache
-
Install mod_jk module
sudo apt-get install libapache2-mod-jk
-
Enable mod_jk
sudo a2enmod jk
-
Configure mod_jk workers.properties /etc/libapache2-mod-jk/workers.properties
workers.tomcat_home=/opt/tomcat workers.java_home=/usr/lib/jvm/zulu-7-amd64/jre
To delegate requests from Apache to Tomcat
-
Add the following line to your apache configuration in sites-enabled.
JkMount /manager* ajp13_worker JkMount /openboxes* ajp13_worker
-
To redirect requests from the root context to /openboxes (optional, but recommended)
RedirectMatch ^/$ /openboxes/
-
Restart Apache
sudo service apache2 restart
Note
If you've enabled HTTPS already, you may need to edit multiple files.
- /etc/apache2/sites-enabled/000-default.conf
- /etc/apache2/sites-enabled/000-default-le-ssl.conf