HP (Hewlett-Packard) 5991-5565 Network Card User Manual


 
3. Insert the following line below the DocumentRoot line:
JkMount /jsp-examples/* worker1
4. Before you can verify the Tomcat and Apache integration, you must set Tomcat to listen for
AJP13 requests. The JK module uses AJP to communicate with Tomcat so, you must verify
that the AJP <Connector> element is enabled in the Tomcat file server.xml and that this
file is placed inside the <Service> element.
Verify that the following lines are included and not commented out in the
$CATALINA_HOME/conf/server.xml file.
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
5. Create the following file:
/etc/apache2/conf/workers.properties
Add the following lines to the preceding file:
# Define 1 real worker using ajp13
worker.list=worker1
# Set properties for worker1 (ajp13)
worker.worker1.type=ajp13
worker.worker1.host=<YOUR_TOMCAT_SERVER_IP>
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300
6. If necessary, start Tomcat it by entering the following command:
# $CATALINA_HOME/bin/startup.sh
7. Restart Apache by entering the following command:
# /etc/init.d/apache2 restart
8. Verify that you can connect to Tomcat through the standard HTTP port served by Apache
by navigating to the website:
http://<YOUR_HOSTNAME>/jsp-examples/
Figure 10 show an example of the JSP Examples page.
Figure 10 JSP Examples Page to Test mod_jk
If there are any errors, check the following log files:
28