Chapter 15: Shared Tomcat Hosting To disable the HTTP Connector, either comment out or remove the default Connector setting (which follows) in server.xml: The Connector that is being used is the AJP/1.3Connector that listens, by default, on port 8009: At Apache s end, as shown in the previous chapters, a Connector for Tomcat, such as mod_jk , must be used. The AJP protocol is covered in Chapter 4 , and installing the mod_jkApache module is covered in Chapter 11. The configuration you do is similar to that in Chapter 11 , except for one difference: The JKMount directive is defined inside a VirtualHost directive in httpd.conf. Figure 15-8 shows a diagrammatic representation of how the components are related. The differences between Figure 15-2 and Figure 15-8 reflect the different information pathways. Apache Tomcat Request handler Virtual host module mod_jk module Web client AJP worker(s) AJP connector Virtual host 1 Virtual host 2 Virtual host n AJP Protocol Figure 15-8: Apache and Tomcat serving HTTP requests Here, Apache receives the HTTP request from the client. If name-based virtual hosting is used, it looks up the appropriate virtual host entry using the Host: parameter in the request. In the virtual host entry, mod_jk is configured to forward all appropriate servlet and JSP requests to the appropriate worker. The worker would use the AJP protocol to communicate with a Tomcat process started within the Apache adapter. Tomcat then examines the request to determine whether any of its virtual host definitions match the request. This is similar to the matching process in the standalone Tomcat server. The servlet response is then sent back through the AJP Connector to the mod_jkmodule. This, in turn, instructs Apache to send the reply back to the Web client. Configuring Apache Assuming that mod_jkApache module has been appropriately installed as explained in Chapter 11 , you now take a look at adding virtual host support to this configuration.
If you looking for unlimited one inclusive web hosting plan please check cheap web hosting website.