aspose file tools
The moose likes Tomcat and the fly likes Apache Web Server with Tomcat 7 - Mapping VirtualHost to Context (mod_jk) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Storm Applied this week in the Other Open Source APIs forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache Web Server with Tomcat 7 - Mapping VirtualHost to Context (mod_jk)" Watch "Apache Web Server with Tomcat 7 - Mapping VirtualHost to Context (mod_jk)" New topic
Author

Apache Web Server with Tomcat 7 - Mapping VirtualHost to Context (mod_jk)

Brian Ata
Greenhorn

Joined: May 22, 2010
Posts: 27
Hi guys,

I have been reading for a time now and still couldn't figure out how to map a VirtualHosts defined in Apache Web Server to point to different Tomcat Contexts.

I am using Apache 2.2x and what I did so far is:

To httpd.conf file, I added :



And in the httpd-vhosts.conf file :



And I have the workers file :



Assuming that Tomcat has Context "DomainA" for www.a.com, and "DomainB" for www.b.com, I can reach these sites by simply typing www.a.com/DomainA/ and www.b.com/DomainB/
What I want is to access these sites without attaching Context names,"DomainA" or "DomainB" to actual domain names. More clearly I want to access these sites just by using the domain names.

Would please somebody direct me to the correct path ..

Thanks!

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Apache Web Server with Tomcat 7 - Mapping VirtualHost to Context (mod_jk)