]> granicus.if.org Git - apache/commitdiff
Add the ProxyPassReverse directive which allows Apache to be
authorRalf S. Engelschall <rse@apache.org>
Mon, 23 Feb 1998 08:04:09 +0000 (08:04 +0000)
committerRalf S. Engelschall <rse@apache.org>
Mon, 23 Feb 1998 08:04:09 +0000 (08:04 +0000)
used as a full-featured Reverse Proxy in front of a backend
webserver cluster.

Submitted by: Ralf S. Engelschall
Reviewed by: Martin Kraemer, Ralf S. Engelschall

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80296 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_proxy.html

index bbeca97016dee6d718d235e5786873629bc80ea5..b8c6e3ca0963e5ad765b4510535ba3bea518f39f 100644 (file)
@@ -43,6 +43,7 @@ and other protocols.
 <LI><A HREF="#proxyrequests">ProxyRequests</A>
 <LI><A HREF="#proxyremote">ProxyRemote</A>
 <LI><A HREF="#proxypass">ProxyPass</A>
+<LI><A HREF="#proxypassreverse">ProxyPassReverse</A>
 <LI><A HREF="#proxyblock">ProxyBlock</A>
 <LI><A HREF="#noproxy">NoProxy</A>
 <LI><A HREF="#proxydomain">ProxyDomain</A>
@@ -200,6 +201,71 @@ internally converted into a proxy request to
 
 <HR>
 
+<H2><A NAME="proxypassreverse">ProxyPassReverse</A></H2>
+<A
+ HREF="directive-dict.html#Syntax"
+ REL="Help"
+><STRONG>Syntax:</STRONG></A> ProxyPassReverse <EM>&lt;path&gt; &lt;url&gt;</EM><BR>
+<A
+ HREF="directive-dict.html#Default"
+ REL="Help"
+><STRONG>Default:</STRONG></A> <EM>None</EM><BR>
+<A
+ HREF="directive-dict.html#Context"
+ REL="Help"
+><STRONG>Context:</STRONG></A> server config, virtual host<BR>
+<A
+ HREF="directive-dict.html#Override"
+ REL="Help"
+><STRONG>Override:</STRONG></A> <EM>Not applicable</EM><BR>
+<A
+ HREF="directive-dict.html#Status"
+ REL="Help"
+><STRONG>Status:</STRONG></A> Base<BR>
+<A
+ HREF="directive-dict.html#Module"
+ REL="Help"
+><STRONG>Module:</STRONG></A> mod_proxy<BR>
+<A
+ HREF="directive-dict.html#Compatibility"
+ REL="Help"
+><STRONG>Compatibility:</STRONG></A> ProxyPassReverse is only available in
+Apache 1.3b6 and later.<P>
+
+This directive lets Apache adjust the URL in the <TT>Location</TT> header on
+HTTP redirect responses. For instance this is essential when Apache is used as
+a reverse proxy to avoid by-passing the reverse proxy because of HTTP
+redirects on the backend servers which stay behind the reverse proxy.
+<P>
+&lt;path&gt; is the name of a local virtual path.<BR>
+&lt;url&gt; is a partial URL for the remote server - the same way they are
+used for the <TT>ProxyPass</TT> directive.
+<P>
+Example:<BR>
+Suppose the local server has address <SAMP>http://wibble.org/</SAMP>; then
+<PRE>
+   ProxyPass         /mirror/foo http://foo.com
+   ProxyPassReverse  /mirror/foo http://foo.com
+</PRE>
+will not only cause a local request for the
+&lt;<SAMP>http://wibble.org/mirror/foo/bar</SAMP>&gt; to be internally
+converted into a proxy request to &lt;<SAMP>http://foo.com/bar</SAMP>&gt; (the
+functionality <SAMP>ProxyPass</SAMP> provides here). It also takes care of
+redirects the server foo.com sends: when <SAMP>http://foo.com/bar</SAMP> is
+redirected by him to <SAMP>http://foo.com/quux</SAMP> Apache adjusts this to
+<SAMP>http://wibble.org/mirror/foo/quux</SAMP> before forwarding the HTTP
+redirect response to the client. 
+<P>
+Note that this <SAMP>ProxyPassReverse</SAMP> directive can also by used in
+conjunction with the proxy pass-through feature ("<SAMP>RewriteRule ...
+[P]</SAMP>") from
+<A
+ HREF="mod_rewrite.html#RewriteRule"
+><TT>mod_rewrite</TT></A> because its doesn't depend on a corresponding
+<SAMP>ProxyPass</SAMP> directive.
+
+<HR>
+
 <H2><A NAME="proxyblock">ProxyBlock</A></H2>
 <A
  HREF="directive-dict.html#Syntax"