Re: how to configure host headers for 3 IIS machines ?

From: Kristofer Gafvert (kgafvert_at_NEWSilopia.com)
Date: 03/05/04


Date: Fri, 5 Mar 2004 12:58:18 +0100

Hello,

If you only have one public IP, this will not work with IIS only.

IIS can:
1) Host multiple websites on one machine, and distinguish them with a host
header
2) Redirect to another webserver, based on a host header

IIS cannot:
1) Act as a reverse proxy

And what you are asking for is a reverse proxy.

Let me explain. IIS1 is the "main" server, and accepts all traffic. Then,
based on the host header, it will redirect the request to another internal
webserver. The problem here is that IIS can only redirect. So, you will have
to write the internal IP in the "redirec to" text box. The web client
(internet explorer) will then make a "new request" to this new webserver.
So, if the IP of the internal webserver was 192.168.0.10, it will try to
connect to IP 192.168.0.10, which will of course not work (private IPs are
not routable).

There are a few ways to solve this.

1) Redirect to the public IP, but another port, and then in the firewall,
forward this port to one of the other web servers.
2) Use a third-party application, acting as a reverse proxy. For example
OctaGate http://www.octagate.com/HTTPRedirect.asp or Apache
http://www.apacheweek.com/features/reverseproxies Note: Apache can of
course act as a reverse proxy for IIS Web Servers.

So, if we go back to your suggestions:

1) Yes, this is possible. As i also told you, the "main" server can be
configured to redirect to another port, so your customers do not have to
remember the port.

2) Using host headers, without including the external IP and another port is
not possible. The client machine (not on your network), do not know how to
connect to another webserver inside your firewall, if there is no open
connection between that webserver and the client. This is what a reverse
proxy solves. And unfortunately, IIS cannot act as a reverse proxy :-(

-- 
Regards,
Kristofer Gafvert - IIS MVP
Reply to newsgroup only. Remove NEWS if you must reply by email, but please
do not.
www.ilopia.com - FAQ and Tutorials for Windows Server 2003
"scott" <scottscotland@yahoo.com> wrote in message
news:uZyy5SqAEHA.2808@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I posted about this before but not sure if i fully followed.
>
> Im looking to run three IIS machines on the same public IP.
>
> IIS1 = used to deal with http traffic using host headers.
> IIS2 = 2003 sharepoint windows services = www.domain2.com
> IIS3 = w2k sharepoint team services = www.domain2.com
>
> NOTE: cant run on same machine.
>
> As far as im aware the only way i can do this is.
>
> 1. publishing IIS machines on a non standard port ie. www.domain.com:port
> OR
> 2. using host headers i can keep all machines on port 80. Host header
would
> then redirect user to appropriate machines.
>
> If my network was setup like this:
>
> -----------------------------------
> net
> v
> router > iis1 > router > iis2
> v                        v
> fw                     iis3
> v
> lan
> -------------------------------
>
> 1. If  host headers were configured on IIS1 could i plug in as many IIS
> machines behind it as I like ?
>
> 2. How would I configure host headers to deal with this setup ?
>
> For example:  I enter www.domain2.com in a browser, im directed to my IP,
> IIS1 says its domain2 and uses host headers to push traffic to IIS2 ?
>
> NOTE: assumes IE6 with domain info in header.
>
> Thanks for your time and help.
> Scott
>
>


Relevant Pages

  • Re: redirect http to www
    ... you can say that host domain.com is 212.452.10.120. ... In IIS you just set up a website on that IP address. ... "Anthony" wrote: ... one or more host headers for the listen to respond to, ...
    (microsoft.public.windows.server.general)
  • Re: Multiple hostheaders for one website.
    ... Can you please use WFetch from the IIS 6.0 Resource Kit tools, ... /default.htm (or some other file on the website) ... some forwarding service that does not send the host header field. ... > Initially I had just other.main.co.uk set in host headers pointing to ...
    (microsoft.public.inetserver.iis)
  • Re: If I use Host Headers should I give Port Numbers...
    ... >I created multiple siteson my IIS and a BOOK told that i ... >can use "Host Headers" if I wanted to create multiple ... >number) I can use Host headers...but when i used the host ... If this is Administering IIS 5, the book is right, but O'Brien's ...
    (microsoft.public.inetserver.iis.security)
  • Re: physical layout of 2 IIS machines when using host headers and single IP ?
    ... > When using host headers to support 2 IIS machines on a single public IP ... You wouldn't use Host Headers with two machines - the point of host headers ... Tom Kaminski IIS MVP ...
    (microsoft.public.inetserver.iis)
  • experiment supports concept of using host header names as securit y layer
    ... ISAPI filters can't evaluate a request until a virtual site has been ... selected and its set of running ISAPI filters has become known to the IIS ... As a quick experiment in using a host header name as a security device, ...
    (Focus-Microsoft)