1,105,334 Community Members

Apache/Tomcat - Hostheaders

Member Avatar
xela
Newbie Poster
3 posts since May 2009
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

My case:
I have several webapps running on my tomcat server like this:
demo.myserver.com/application1
demo.myserver.com/application2
demo.myserver.com/application3

This is what I want:
Application1.mydomain.com to point to demo.myserver.com/application1
Application2.mydomain.com to point to demo.myserver.com/application2
Application3.mydomain.com to point to demo.myserver.com/application3

This is what I have done:
1. I have set my DNS server to point Application1.mydomain.com and so on to my servers IP address.
2. I have set up apache webserver, apache tomcat6 and the JK2 plugin to make them communicate.
3. I have configured a virtual domain for all my domains in httpd-vhosts.conf and enabled it in httpd.conf.

httpd.conf:

Include conf/extra/httpd-vhosts.conf
httpd-vhosts.conf:

<VirtualHost *:80>
ServerName Application1.mydomain.com
JkMount /* workername
</VirtualHost>

4. I have verified that everything works fine with just apache.

My problem is when I try to use the JKMount to redirect the requests to my application. How can I do this? Or is it a better way of doing this?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: