On Aug 18, 2009, at 4:08 PM, Kirk Ouimet wrote:
I have three separate web servers with three different internal IP
addresses
on a network with only one public IP address. Each web server has
security
restrictions such that I cannot just run all of my websites on a
single web
server. All are running Apache.
I want to setup subdomains that allow me to access each of the
different web
servers remotely, all on port 80. E.g.,
site1.domain.com
site2.domain.com
site3.domain.com
Where all three of those domains resolve to my single public IP
address, but
some type of service examines the request to see which subdomain is
being
requested and pulls the data from the appropriate server.
Kirk, you could set your router/firewall to direct traffic from the
external IP to the 1st web server, then use Apache's ProxyPass
directive to handle requests for the 2nd and 3rd web servers. Server
1's httpd.conf would look something like this:
<VirtualHost *:80>
ServerName site1.domain.com
</VirtualHost>
<VirtualHost *:80>
ServerName site2.domain.com
ProxyPass / http://192.168.1.2/ # proxy requests to the 2nd web server
</VirtualHost>
<VirtualHost *:80>
ServerName site3.domain.com
ProxyPass / http://192.168.1.3/ # proxy requests to the 3rd web server
</VirtualHost>
Of course, server 1 has to be online for 2 and 3 to work. Perhaps a
4th server would serve you better as a dedicated firewall/proxy.
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net