[Shorewall-users] redirect virtual webservers

Magnus Stenman stone@hkust.se
Mon, 29 Apr 2002 22:02:00 +0200


Goetz Reinicke wrote:
> 
> Magnus Stenman wrote:
> > Goetz Reinicke wrote:
> >
> >>Hi,
> >>
> >>on a internal test webserver I have different namebased virtual
> >>webservers. Ther is an A record om my DNS system for the main server,
> >>and CNAME records for the virtual servers.
> >>
> >>Now I'm thinking of a public webserver also with virtual namebased
> >>servers. What I need is to redirect incoming http(s) requests to the
> >
> >
> > https will require one public IP per virtual server
> > (unless you run on different ports)
> >
> >
> >>internal web servers, but how to handle the different virtual names??
> >
> >
> > The virual namebased ones will work fine.
> 
> How?

Client looks up "www.virtual.server", gets a cname to your external IP.
It connects (this gets forwarded to the internal web server) and
tells the web server that it wants pages from "www.virtual.server"
(the Host: www.virtual.server HTTP header)

web server returns pages.

> 
> <....>
> >
> >
> > To do this you'll need a reverse proxy or similar.
> 
> What is needed for that? is this possible with shorewall, if so how?

A reverse proxy or similar. Not included in shorewall AFAIK.

Maybe squid, or apache's mod_proxy can do that. I haven't tried.

> 
> > You need to inspect the HTTP request, and look at the
> > Host: header to know which server to redirect to.
> 
> dito.

That's the job of the reverse proxy.



/m


> 
> Thanks...
> ...Götz Reinicke
> 
> - Götz Reinicke -------------------- mailto: greinick@filmakademie.de -
>    IT Koordinator                                   Tel: 07141/969-420
>    IT-OfficeNet Filmakademie Baden-Württemberg    Fax: 07141/969-55420
> - Mathildenstr. 20, 71638 Ludwigsburg ----------- www.filmakademie.de -
> 
> _______________________________________________
> Shorewall-users mailing list
> Shorewall-users@shorewall.net
> http://www.shorewall.net/mailman/listinfo/shorewall-users