best solution for webserver redirection

Daniel T. Staal DStaal at usa.net
Thu Sep 14 12:56:57 PDT 2006


On Thu, September 14, 2006 3:43 pm, MK said:
> Hello all
>
> I would like to know the best solution which is suitable for webserver
> redirection in following situation:
>
> LAN --- WEBSERVER_ON_LAN ---------- NAT_OpenBSD_Apache -------- internet
>
> OpenBSD NAT has only one public IP, and a domain name: for example -
> example.net
>
> main webserver on OpenBSD is accessible under this domain name. But what
> to do when I want to allow access also for webserver on my LAN for users
> from internet under another domain: lan.example.net
>
> I can not use redirection in PF because I need both web server on same
> standard port. I think that this situation is not solvable simply by PF
> because it does not do application level filtering.
>
> I've found in Apache manual that I can use a redirect as Virtual
> Hostname. I set it up and it works. Whenever the request for
> lan.example.net is in a game the Apache inform the client's browser to
> use public IP of OpenBSD and non standard port which is redirected by PF
> to lan web server. Is there any better solution for my case? For example
> it does not look very nice when you have an IP address in your URL
> address bar instead of domain name in your browser. I can not use
> additional public IP address.

I'd take a look at mod_proxy for your OpenBSD webserver.  Basically, you
want it to serve some pages, and proxy others.

Daniel T. Staal

---------------------------------------------------------------
This email copyright the author.  Unless otherwise noted, you
are expressly allowed to retransmit, quote, or otherwise use
the contents for non-commercial purposes.  This copyright will
expire 5 years after the author's death, or in 30 years,
whichever is longer, unless such a period is in excess of
local copyright law.
---------------------------------------------------------------



More information about the Openbsd-newbies mailing list