Question : Setup Multible Websites in Seperate Servers Behind Single IP NAT

Hello,

I work for a small organization that needs to host multiple websites on different servers behind a single NAT-ed IP address. Each website has a different external DNS name with the appropriate records pointing it to our external IP address.

We are currently hosting a number of these websites on a single IIS7 server. Incoming connections on Port 80 get forwarded to the IIS server. Then, within IIS, we are using the incoming IP header to match the DNS name to the appropriate website.  This works fine for any of our websites hosted on our IIS server.

Now, however, we need to add an Apache hosted website on a separate server (different internal IP address) to the mix.

Is there a way to get "a.org", "b.org", and "c.org" to still foward to the IIS server and get decoded there while "d.org" will redirect to the Apache server?

I am currently making this work by hosting the Apache site on a non-standard http port. This way, the redirection is taken care of at the NAT router via port forwarding. I would rather, however, allow everything to remain on port 80, or at least make any port forwarding transparent to the user (currently they have to connect to "d.org:X").

Is there a way to do this from the external DNS side? Can it be done internally by having ISS transplarently forward any requests from "d.org" to the appropriate server (while maintaining the address of "d.org" in the user's browser).  We have an internal DNS server, if something clever can be done there.

Any suggestions would be appreciated.

Thanks,
Andy

Answer : Setup Multible Websites in Seperate Servers Behind Single IP NAT

you can use apache as the primary web server, and enable its reverse proxy features for the IIS web sites.

in essence, you will create a virtual host on apache for every web site, but declare reverse proxy directives to the IIS sites. By using the ProxyPreserveHost directive you can even retain the web names in IIS.

Check if you need the ProxyPassReverseCookieDomain . If you can get away without changing IIS then probably not.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
NameVirtualHost *:80
ProxyRequests Off
 

ServerName d.org
DocumentRoot /www/domain

 

ServerName a.org
ServerAlias b.org c.org
ProxyPreserveHost On
ProxyPass / http://iis_server/ 
ProxyPassReverse / http://iis_server/ 
Random Solutions  
 
programming4us programming4us