Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache 2.2 multiple domains and tomcat

Status
Not open for further replies.

wazzy

IS-IT--Management
Nov 5, 2013
1
GB
Hi, I am responsible for a server which does several websites on ports 80 (apache httpd 2.2), port 85 (apache httpd 2.2) & port 8080 (apache tomcat).

The server serves pages on port 80 to a separate website.
This port 80 website works from within a VirtualHost scope.
<VirtualHost *:80>
...
</VirtualHost>
I want to point following domains to server (mainserver):

domain1.fakedomain.com to domain2.fakedomain.com to domain3.fakedomain.com to domain4.fakedomain.com to domain5.fakedomain.com to
All DNS requests point to server so the apache httpd configuration on port 80 needs to separate each request.
For me this is a very tricky, complicated and I have no experience of either setting more than a basic virtual host. Please can someone help me how to configure httpd.conf or httpd-vhosts conf file.

Thank you in anticipation of your reply.
 
This uses mod_proxy. You can substitute mainserver for localhost if I understood you correctly that *all* this would be running on a single box. This will only work for non-ssl requests, unless the box has multiple IP's bound to it.


<VirtualHost domain1.fakedomain.com:80>
ProxyPass / ProxyPassReverse / </VirtualHost>
<VirtualHost domain2.fakedomain.com:80>
ProxyPass / ProxyPassReverse / </VirtualHost>
<VirtualHost domain3.fakedomain.com:80>
ProxyPass / ProxyPassReverse / </VirtualHost>
<VirtualHost domain4.fakedomain.com:80>
ProxyPass / ProxyPassReverse / </VirtualHost>
<VirtualHost domain5.fakedomain.com:80>
ProxyPass / ProxyPassReverse / </VirtualHost>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top