httpd-users mailing list archives

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

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 111.22.33.44:80
>       ServerName www.domain.tld
>       DocumentRoot /www/domain
>
>config 2:
>
>       Listen 111.22.33.44:8080
>       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 domain.com:8080 so that it goes to the other machine. Is that 
feasible?

Maybe this would be a better layout of what I have set up:

255.255.255.255 (external IP that all domains point at.
  |
  |_ Router (set to direct ports to two different internal IPs)
      |
      |_ Machine 1 (internal IP: 10.0.0.10, listening on 80)
      |    domain1.com
      |    domain2.com
      |
      |_ Machine 2 (internal IP: 10.0.0.50, listening on 8080)
           domain3.com
           domain4.com

I hope that makes better sense.

-Darrel

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message