- 1.1) Make sure that you have configured Apache to use the Prefork MPM (not the Worker MPM) to avoid hangs caused by an AJP bug. See here for details.
- 1.2) Ensure that an AJP connector is defined in your [tomcat]/conf/server.xml file. This is the case by default, so you probably don't need to change anything. There should be a line like the following in server.xml:
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
If you need to edit server.xml then restart Tomcat afterwards.
- 1.3) Enable mod_proxy and mod_proxy_ajp in Apache. For example, uncomment the 2 'LoadModule' lines that will look something like this:
LoadModule proxy_module /usr/lib/apache2/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
- 1.4) Add the following statement to the configuration file for your virtual host (or, if you are not using virtual hosts, your httpd.conf file):
ProxyPass /asset-bank ajp://<tomcat server>:8009/asset-bank retry=0
If you are running Tomcat on the same machine as Apache you should use ‘localhost’ as the tomcat server name:
ProxyPass /asset-bank ajp://localhost:8009/asset-bank retry=0
- 1.5) Restart apache
- 1.6) The application should now be available to view at http://<server name>/asset-bank/
- 1.7) For more information on using mod_proxy_ajp to combine Apache and Tomcat read the mod_proxy_ajp documentation