[K12OSN] OT: Reverse proxy for internal websites

Timothy Legge timlegge at gmail.com
Sun Jan 13 00:45:36 UTC 2008


On Jan 12, 2008 1:22 PM, David Hopkins <dahopkins429 at gmail.com> wrote:
> Also, I am still not clear on when to use a hostname for the
> VirtualHost and when to use an IP address. For name based, I thought
> it was just a
>
> <VirtualHost *:80>
> ServerName mysite1.domain.org
> ... other stuff
> </VirtualHost>

I believe that the *:80 means listen on port 80 for all IP addresses
on the server.  Therefore the * can be replaced with any ip address.
It is the ServerName directive that specifies the domain name.  If the
host name maps to an IP address I imagine you can use either for the
virtual host but IP addresses work fine.

> and apache matches up the mysite1.domain.org which is what the browser
> uses to determine which block to use. Internal testing of the 6 sites
> being hosted show that it seems to work. e.g. a address of
> http://mysite2.domain.org returns mysite2 and not mysite1 though both
> are wrapped in their own <VirtualHost *:80></VirtualHost> blocks.

Yes, the name based would work like that I believe.  It is always nice
to have multiple IPs but if you don't, that should work.

Also see:  http://3cx.org/item/46

Tim




More information about the K12OSN mailing list