This article describes how to enable Apache server integration with Tomcat. This will allow users of FootPrints 12 to browse to the Apache server instead of browsing directly to the FootPrints Tomcat server. The Apache server integration will forward all FootPrints requests to the Tomcat server. Additionally, integrating the Web Server and Tomcat, is a required step prior to Enabling Web Server Authentication in FootPrints 12, if that is a desired Authentication method. Steps for integrating Apache installed on either a Windows or Linux server are provided below. Additionally, these steps must be performed with full Administrator privileges. |
Windows: NOTE 1: These instructions apply to integrating Apache HTTP server 2.2 in a Windows environment with Tomcat. NOTE 2: The instructions below reference C:\Program Files (x86)\Apache Software Foundation\Apache2.2 as the folder where Apache HTTP server is installed and C:\Program Files\Apache Software Foundation\Tomcat 7.0.29 as the folder where Tomcat is installed. If Apache HTTP server and Tomcat are installed in different folders on your server, please adjust accordingly. 1. Download and extract the Apache HTTP server Tomcat connector module (mod_jk.so) from here. Make sure to download the correct version for your operating system and HTTP server. 2. Download and extract the Apache HTTP server authentication module (mod_auth_sspi.so) from here. This module lets Apache 2.x users authenticate against Win32 domains. 3. Locate a folder in your Apache HTTP server installation folder named modules. For example: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\modules 4. Copy mod_jk.so and mod_auth_sspi.so files to the modules folder. 5. Locate a folder in your Tomcat installation folder named conf. For example: C:\Program Files\Apache Software Foundation\Tomcat 7.0.29\conf 6. Create a text file in the conf folder named: LoadModule jk_module modules/mod_jk.so 9. Create a text file in the conf folder named: workers.properties 10 . Add the following text to the workers.properties file:worker.list=servicecore worker.servicecore.host=localhost worker.servicecore.port=8009 worker.servicecore.type=ajp13 11. Save and close the workers.properties file. 12. Locate a folder in your Apache HTTP server installation folder named conf. <!-- Define an AJP 1.3 Connector on port 8009 --> <!-- Define an AJP 1.3 Connector on port 8009 --> 18. Start the Apache Monitor.
Linux: 1. Download Apache server Tomcat connector module sources (tomcat-connectors-X.X.XX-src.tar.gz) from here. Make sure to download the correct version for your operating system and HTTP server 2. Extract the compressed file to create the source directory. tar -xvzf tomcat-connectors-X.X.XX-src.tar.gz 3. Locate a folder in your tomcat-connectors source directory named native. For example: cd /usr/download/tomcat-connectors-X.X.XX-src/native 4. Build your custom mod_jk.so module, the module will be created on the directory named native. Make sure to use your local apxs path. For example: ./configure --with-apxs=/usr/share/Apache2/bin/apxs make 5. Locate a subdirectory of your Apache server installation directory named modules. For example: /usr/share/Apache2/modules 6. Copy the newly created mod_jk.so file from /usr/download/tomcat-connectors-X.X.XX-src/native/apache-2.0 to the modules directory. 7. Locate a subdirectory of your Apache server installation directory named conf. For example: /usr/share/Apache2/conf 8. Create a text file in the conf directory named: workers.properties 9. Add the following text to the workers.properties file: worker.list=servicecore worker.servicecore.host=localhost worker.servicecore.port=8009 worker.servicecore.type=ajp13 10. Save and close the workers.properties file. 11. Locate a text file in the conf directory named: httpd.conf 12. Add the following text to the end of the httpd.conf file: LoadModule jk_module /usr/share/Apache2/modules/mod_jk.so JkWorkersFile /usr/share/Apache2/conf/workers.properties JkLogFile /usr/share/Tomcat 7.0.29/logs/mod_jk.log JkLogLevel info JkMount /footprints/servicedesk servicecore JkMount /footprints/servicedesk/* servicecore 13. Save and close the httpd.conf file. 14. Open server.xml in your Tomcat installation directory. For example: /usr/share/Tomcat 7.0.29/conf/server.xml 15. Replace the following lines: <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" redirectPort="8443"/> with: <!-- Define an AJP 1.3 Connector on port 8009 --> <Connector port="8009" protocol="AJP/1.3" tomcatAuthentication="false"/> 16. Stop and start Tomcat: cd /usr/share/Tomcat 7.0.29/bin ./shutdown.sh ./startup.sh 17. Restart Apache server: /usr/share/Apache2/bin/apachectl restart 18. Apache HTTP server is now configured to forward all FootPrints requests to the Tomcat server. You can test this by browsing to http://localhost/footprints/servicedesk (or http://FPservername/footprints/servicedesk if accessing from a client computer) on the FootPrints application server. |