httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrel Austin <>
Subject Re: Port-based Virtual Hosts
Date Tue, 15 Jan 2002 14:34:19 GMT

Thanks for the reply!

>I'm not too clear what you want to do. If you have the content of both
>sites on the same physical machine and you want to do port based VH-ing,
>then that is no problem.

Nope. I actually have two separate machines. Both running apache. 
Behind one IP. (so I'll skip on down to your second answer...)

Wait...actually, I do have a question. When would someone want to use 
port-based Virtual Hosts on the same machine? Would that be a 
security issue?

Anyways, on to my question...

>If you (for whatever reason) want to have *two* instances of apache,
>then you need two separate config files, start apache twice and make
>sure the IP/port allocations don't conflict, e.g.
>config 1:
>       Listen
>       ServerName www.domain.tld
>       DocumentRoot /www/domain
>config 2:
>       Listen
>       ServerName www.domain2.tld
>       DocumentRoot /www/domain2

Can those two config files sit on two different physical machines?  I 
assume they can. However, how would I then point a domain name at the 
machine listening on port 8080? AFAIK, the domain has to resolve to 
an IP address, which, by default, goes through port 80. So, I suppose 
my question is, can I redirect traffic that, by default is hitting 
the machine listening to port 80 to the machine listening to port 
8080? My initial thought on the 'easy solution' was to point the 
domain name at the main server, and then just set up an HTML redirect 
to so that it goes to the other machine. Is that 

Maybe this would be a better layout of what I have set up: (external IP that all domains point at.
  |_ Router (set to direct ports to two different internal IPs)
      |_ Machine 1 (internal IP:, listening on 80)
      |_ Machine 2 (internal IP:, listening on 8080)

I hope that makes better sense.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message