You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Morten <li...@kikobu.com> on 2004/12/29 20:18:04 UTC

[users@httpd] Re: best way to redirect incoming traffic

jdyke wrote:
> I'm in a location where an external vendor manages a VPN/Firewall and 
> currently we have non standard ports open to gain access to certian 
> internal sites.  The desire is close those ports and have everything 
> come through port 80 or 443 and get redirected once inside, based on 
> site name.
> 
> site.com runs on 80 and NATs to a windows box (in place now)
> a.site.com runs on 80 and NATs to a FreeBSD host
> b.site.com runs on 80 and NATs to a linux host
> c.site.com runs on 80 and NATs to a linux host
> 
> currently the last three will run as site.com:80XX and i'd like to close 
> those down.
> 
> Looking for some suggestions on the best way to accomplish this.
> 
> Was thinking of:
> mod_rewrite to send traffic to the right place, or using ipfw/iptables 
> to route traffic once inside...
> 
> Any input is appreciated.

I'd go with mod_proxy and virtual hosts, eg.:

NameVirtualHost *

<VirtualHost *>
   ServerName a.site.com
   ProxyPass        / http://freebsdhost:port
   ProxyPassReverse / http://freebsdhost:port
</VirtualHost>

<VirtualHost *>
   ServerName b.site.com
   ProxyPass        / http://otherhost:port/path/
   ProxyPassReverse / http://otherhost:port/path/
</VirtualHost>

Morten


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org