Chapter 11: Tomcat and Apache HTTP Server .

Chapter 11: Tomcat and Apache HTTP Server . In the $APACHE_HOME/conf/extra/httpd-ssl.conf file, add the proxy configuration detailed in the section Using the mod_proxy Module into the default element. The following configuration listing shows this modification. Of course, you need to replace 192.168.23.228 with the IP address of your Tomcat 6 server. … ProxyRequests Off ProxyPreserveHost On Order deny,allow Allow from all ProxyPass /examples/jsp ajp://192.168.23.228:8009/examples/jsp ProxyPassReverse /examples/jsp ajp://192.168.23.228:8009/examples/jsp Order allow,deny Allow from all Make sure you have configured an AJP connector on the Tomcat server. . Finally, restart Tomcat and then restart Apache. To test the SSL-enabled Apache-Tomcat setup, try the following URL: https://192.168.23.168/examples/jsp/dates/date.jsp You should replace the IP address with the name of your server, and the exact name you specified for the CN element of your server certificate. This should execute the date example bundled with the Tomcat distribution. You should see similar indications confirming that you have a secured HTTPS connection to this JSP. In case of any errors, as before, refer to the logs in the $APACHE_HOME/logsdirectory. If you use SSL at the Apache end only, the connection between Apache and Tomcat may still be unsecured. This may be of concern in deployments where Apache runs on a server in the DMZ (demilitarized zone), and Tomcat is behind an internal firewall. One way of addressing this is by using an SSH (Secure Shell) tunnel to encrypt the AJP data passing between Apache and Tomcat. The details of setting up an SSH tunnel are not covered here, but if you do set up such a tunnel, you should remember to change the host/port values in Apache s workers.propertiesfile to point to the tunnel, instead of directly to the Tomcat server. Another way is to use the OpenSSL support for the AJP Connector via the APR Connector. Tomcat Load Balancing with Apache In this chapter, we cover only a basic implementation of load balancing. Chapter 18 describes a more sophisticated environment, with support for persistent sessions with in-memory session replication. The configuration described has been tested on Apache 2.2.3 with mod_jk 1.2.19 on a Windows system.

If you looking for unlimited one inclusive web hosting plan please check unlimited web hosting website.

Comments are closed.