I have two servers, both running Redhat ES v3. The Web server resides in my DMZ behind eth0 of my firewall. I use the Apache 2 binary that I get through the RH subscription (ES Extra's). The App server is on the LAN, behind eth1 of my firewall. I have tomcat 5 configured to run over 8080. I have a rule in my firewall that allows traffic over port 8009 to pass from VLAN IP of the webserver to the VLAN IP of the App server.
Configuring the App server was easy. I just made sure that the following connector statement was in conf/server.xml:
<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector port="8009" enableLookups="false" redirectPort="8443" debug="0" protocol="AJP/1.3" />
Configuring the Web server took a little more time. First, I downloaded a mod_jk2.so binary that I thought was close enough to my OS and put it in the /usr/lib/httpd/modules directory of my Web server. Second, I created the following workers2.properties file and put in in the same directory as my httpd.conf file:
--------------------
[channel.socket:192.168.aa
a.aaa:8009
]
port=8009
host=192.168.100.10
tomcatId=192.168.aaa.aaa:8
009
[shm]
shm=/var/log/httpd/jk.shm
size=100248576
debug=0
disabled=0
[ajp13:192.168.aaa.aaa:800
9]
channel=channel.socket:192
.168.aaa.a
aa:8009
worker=ajp13:192.168.aaa.a
aa:8009
[uri:/*]
--------------------------
----
Next, I modified the httpd.conf file and put the following mod_jk2.so LoadModule statement with all the other LoadModule statements:
LoadModule jk2_module modules/mod_jk2.so
That was it. After starting Apache and Tomcat, it all worked almost perfectly. I have 4 Virtual Hosts in my Web server. Once I loaded the mod_jk2.so module, every virtual host was sent to the App server. I have no clue how to make it so that only virtual host 2 is sent to the App server. Everything would be great if I didn't have to run other websites, but I do...
Here is an snapshot of my Virtual Hosts 2 taken from httpd.conf of the Web server:
# Virtual host 2
<VirtualHost 192.168.xxx.xxx>
ServerName
www.<domainname>.com
ServerAdmin admin@<domainname>.com
DocumentRoot /var/www/<domainname>/htdo
cs
ServerSignature Email
DirectoryIndex index.html index.htm index.php default.htm default.html
LogLevel debug
HostNameLookups off
</VirtualHost>
Any ideas?