Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

httpd-vhosts.conf file:

NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin abc@abc.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?

share|improve this question
    
Do you have a servlet /root/sub in your application? –  Ankit Feb 19 '12 at 12:38
    
The context root of the application is just /. There is no servlet at /root/sub but it gets intercepted by a framework servlet and then it routes accordingly to a servlet. –  SoltanG Feb 19 '12 at 20:57
    
Stop your apache server, delete all the existing logs, start your server and see if you are getting any error for V hosts that you have defined, try to rectify that problem first, before trying to access your application. –  Ankit Feb 20 '12 at 7:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.