Hosting multiple sites on a single webapp in tomcat

Posted by satish on Server Fault See other posts from Server Fault or by satish
Published on 2010-05-09T13:23:16Z Indexed on 2012/10/04 9:40 UTC
Read the original article Hit count: 393

Filed under:
|
|

Scenario:

I have a website - www.mydomain.com. Registered users will be given the choice of getting a permanent url to their account on mydomain.com as a subdomain like (username.mydomain.com) or they can opt to have their own domain like www.userdomain.com. So the user can access his/her account through the subdomain URL or their own hostname and the request should be forwarded to a specific url on mydomain.com.

For example: xyz.mydomain.com or www.xyz.com should give the user account from www.mydomain.com/webapp/account?id=xyz. The user should be completely unaware about where the content is coming from.

Setup:

My website is running as a webapp in tomcat 5.5.28 with apache as the web server. I am using a VPS which means I have control over all the configuration files (apache, tomcat and dns server).

Can you tell me what are the configurations needed to achieve the above scenario??

© Server Fault or respective owner

Related posts about apache2

Related posts about dns