1

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?

2
  • Have you tried three different workernames?
    – Thilo
    Aug 29, 2011 at 9:08
  • The thing about the workers is that they are used for load-balancing. Therefor you can only have one per Tomcat instance I think. So using multiple workers won't help me unless I use one instance for each webapp. Please correct me if I am wrong.
    – Xela
    Aug 29, 2011 at 13:45

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.