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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Vhosts and multiple instances of apache on one unix box

Status
Not open for further replies.

tewari68

Programmer
Jan 25, 2005
87
0
0
US
Hi,
I am configuring apache with multiple virtual hosts and multiple apache instances running on the same unix box.
I have the following design, appreciate if someone can validate if this is the correct way or there are any potential errors in this
Apache instance 1
domain.tld(10.3.11.106:80 - main site)
legacy.domain.tld(10.3.11.107:80xx) - VirtualHost
Proxy.domain.tld(10.3.11.108:80yy) - VirualHost
oldsite.domain.tld(10.3.11.109:80zz) - VirtualHost
onemoresite.domain.tld(10.3.11.110:80aa)VirtualHost


Apache Instance 2
domain2.tld(10.3.11.106:80bb)-main site

I am using IP based virtual hosts.
Can I use port 80 for all the virtual hosts. Docroot are different for all the Virtual Hosts.
Appreciate input from experts.

Thanks
 
Have you looked at named virtual hosts? Apache will support multiple web sites with different names on the same IP address and all using port 80. The advantage with this is that you don't have to specify that you want just
 
Hi Noway2,
Thanks for your quick response, we have a load balancer in front of apache servers which are proxy servers. So requests will still come to port 80 but LB will redirect it to appropriate port, users don't have to know the port number.
We need to have IP based VHs.
Appreciate if you can validate my above configuration.


Thanks
 
The load balancing server then acts as a reverse proxy.

In answer to the question of your original post, I don't see any reason why you can't use port 80 for all of the hosts. The IP addresses are different. The combination of IP address and port identifies the host. The name also identifies the host in http traffic, but this is irrelevant since you are using IP addressing.

The only place I can see there being a conflict is on your Apache instance 2 which would share an IP address and a port. One of these would have to be something other than 80 if you want to use IP:port resolution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top