Hi, I have a small virtual host problem with my tomcat+apache server. I'm using mod_jk2 and i have the following workers2.properties file: #---- workers2.properties
# Shared memory handling. Needs to be set. [shm] file=/var/log/httpd/shm.file size=1048576 # Example socket channel, explicitly set port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # Example UNIX domain socket [channel.un:/var/tomcat4/work/jk2.socket] tomcatId=localhost:8009 debug=0 # define the worker [ajp13:localhost:8009] #channel=channel.un:/var/tomcat4/work/jk2.socket # To use the TCP/IP socket instead, just comment out the above # line, and uncomment the one below channel=channel.socket:localhost:8009 # Announce a "status" worker [status:status] #magnificul uri mapping [uri:/*.jsp] host=host1.com worker=ajp13:localhost:8009 # Uri mapping [uri:/examples/*] host=host2.com #group=examples worker=ajp13:localhost:8009 #worker=ajp13:/usr/local/tomcat/work/jk2.socket [uri:/status/*] worker=status:status #---- end of workers2.properties i've also configured the virtual hosts in tomcat's server.xml config file. so the default host is host2.com. here is the part where i configure host1.com as virtual host: <!-- Define the default virtual host --> <Host name="magnificul.com" debug="0" appBase="/nethosting/host1.com" unpackWARs="true" autoDeploy="true"> <Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="host1_log." suffix=".txt" timestamp="true"/> <Alias>www.host1.com</Alias> <Context path="" docBase="/nethosting/host1.com/www" debug="0"/> </Host> now the problem is that when i surf to http://www.host1.com/ i get an apache forbidden error. but if i surf to http://www.host1.com/index.jsp all is OK in my httpd.conf i have this line also <IfModule mod_dir.c> DirectoryIndex index.html index.jsp main.jsp <IfModule> if i map an entire directory eg: /examples (tomcat default) then the problem is gone cause tomcat handles all the /examples folder and you can configure easy the welcome-file. i tryed to map the entire directory / eg: [uri:/*] or [uri:/] but if i have something like this in my workers2.properties the jsp handling does not work anymore. any help is appreciated. and sorry for my english. Catalin