I wanted to have to app servers running using one Apache webserver, which was giving me trouble, so I decided to just run one app server through apache but using vhosts definition. Without referencing http-vhosts, everything runs fine but when I include the reference I get
The requested resource (/root/sub) is not available.
I had to tweak workers.properties to connect to the app server which is running on a different http port(8180) and ajp port (8109). This seems to work because without reference to httpd-vhosts file everything works well. Now here are my files, I cannot seem to figure out what is going wrong after spending hours on it. Help appreciated very much!
NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin email@example.com DocumentRoot "C:/local/doc" ServerName server1.com ErrorLog "logs/error.log" CustomLog "logs/access.log" common JkMount /* node1 <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> <Directory "C:/local/doc"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> <Directory "c:/local/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPassMatch ^(.*.*\.(gif|css|html|xml))$ http://proxy.server.com//$1 </VirtualHost>
workers.properties file - worker.list=node1
connection_pool_timeout=600 socket_timeout=60 socket_connect_timeout=3000 reply_timeout=600000 worker.node1.port=8109 worker.node1.host=server1.com worker.node1.type=ajp13 worker.node1.lbfactor=1 worker.node1.ping_mode=A
Since everything works when not referencing httpd-vhosts.conf file from httpd.conf, I think there is something wrong with the way I have defined the vhosts file. But I pretty much copied whatever config existed for server1 in httpd.conf to httpd-vhosts file.
Interestingly when I remove the /root/sub from http:appurl/root/sub it tries to load the app, there is nothing defined at that base url though so it just loads a blank page. This tells me that perhaps it has to do with the context root for app1?