[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Apache reverse proxy.



Hi BOFHs,

To set up an apache reverse proxy, there are 2 main ways of doing it.

1) mod_proxy
LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so
ProxyPass        /path http://host:port
ProxyPassReverse /path http://host:port

2) mod_rewrite + mod_proxy
LoadModule proxy_module /usr/lib/apache/1.3/libproxy.so
LoadModule rewrite_module /usr/lib/apache/1.3/mod_rewrite.so
RewriteEngine on
RewriteRule   ^/path/(.+) http://host:port/$1 [P]
RewriteRule   ^/path  http://host:port/ [P]
ProxyPassReverse /path http://host:port

The first way seems to be the easiest if you only have simple
requirements, the second is more flexible as you can use mod_rewrite
to do more funky things.

This doesn't seem to work to webapps that don't know about the proxy
when you're doing HTTP POSTs, however.

ObUsefulURLs:
   http://httpd.apache.org/docs/mod/mod_rewrite.html
   http://httpd.apache.org/docs/misc/rewriteguide.html
   http://www.engelschall.com/pw/apache/rewriteguide/
   http://httpd.apache.org/docs/mod/mod_proxy.html

Thanks,
Brad
-- 
+=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+
|Brad Marshall                    |           Plugged In Software|
|Senior Systems Administrator     |     http://www.pisoftware.com|
|mailto:bmarshal@pisoftware.com   |  GPG Key Id: 47951BD0 / 1024b|
+-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=+
 Fingerprint:  BAE3 4794 E627 2EAF 7EC0  4763 7884 4BE8 4795 1BD0