Apache with Tomcat
To configure Apache HTTPD as a web server and Tomcat as an application server, it is necessary to use the modules mod_proxy, mod_proxy_ajp, mod_proxy_wstunnel, mod_headers, mod_include, and mod_rewrite included with Apache.
Due to the cache functionality of LumisXP, apache must be configured to check if there is a static file to be served locally. If this file does not exist, the request should be delegated to the application server, even if the request was made for a static file, as this file may be a cache file that has not yet been generated or has expired.
Other advanced configurations for optimization purposes are also recommended for production environments. This guide will not cover how to optimize communication between the web server and the application server.
For more information on the mod_filter, mod_headers, mod_include, mod_proxy, mod_proxy_ajp, mod_proxy_wstunnel, and mod_rewrite modules, refer to the corresponding Apache documentation.
Here are the necessary steps to perform the configuration:
- Edit the file APACHE_HOME/conf/httpd.conf enabling the modules mod_filter, mod_headers, mod_include, mod_proxy, mod_proxy_ajp, mod_proxy_wstunnel, and mod_rewrite if they are not already enabled:
- Configure the virtual host, for example, in the file APACHE_HOME/conf/httpd.conf:
If your application context is not at the root, for example at /portal, you will need to configure the virtual host as follows:
- Configure the AJP connector in the file TOMCAT_HOME\conf\server.xml;
Locate the connector with the AJP/1.3 protocol and add the configurations
URIEncoding
,maxPostSize
,emptySessionPath
,secretRequired
, andsecret
:The AJP connector by default binds to the loopback address. If the Apache HTTPD is not running on the same machine, it is necessary to add the
address
attribute to the Connector with the desired bind address, such as:address="0.0.0.0"
.