Welcome to WebmasterWorld Guest from

Forum Moderators: phranque

Message Too Old, No Replies

multiple NAT'd web servers and host headers

3:31 am on Mar 19, 2010 (gmt 0)

New User

5+ Year Member

joined:Mar 19, 2010
posts: 1
votes: 0

I recently built myself a VMware ESX box and have gone crazy creating some web and other servers, just because I can. The problem is accessing these over the internet as they all sit NATed behind my router at home. I have registered a .com.au domain and can run one www webserver by forwarding port 80 on my router to the internal web server IP.

But I want to run multiple web servers each with their own internal IP and let the host header determine which server gets the request over port 80. So for example

www.domain.com.au goes to (web server)
sp2007.domain.com.au goes to (sharepoint server)
sp2010.domain.com.au goes to (sharepoint 2010 server)

Things i've tried/looked into:
- Using vhosts in apache on the web server but couldnt get it to work, I think this only works for one server with multiple IPs?
- I've read about reverse proxying with apache, looks difficult.
- Reverse proxy with squid - [squid-cache.org...]
- Using host header forwarding with ISA server or similar

Can anyone provide a solution?
9:35 am on Mar 19, 2010 (gmt 0)

Senior Member from KZ 

WebmasterWorld Senior Member lammert is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 10, 2005
posts: 2951
votes: 33

Hi jamin, first of all welcome to WebmastertWorld!

Most NAT routers can only identify packets on their IP/port pair and do not parse incoming messages based on the HTTP headers. You should therefore either use an unique IP/port pair for each service, or use any of the options you mentioned. Sharepoint is often used in a controlled environment with a limited number of users. Would it therefore be an option to use a unique port number for each of these installations? Like

www.example.com goes to (default HTTP port 80)
sp2007.example.com:81 goes to
sp2010.example.com:82 goes to

The Sharepoint users have to add the alternative port number to the URL when they access your system, but with this solution you can do all the routing directly in your router, without having to think about complex software setups.