summaryrefslogtreecommitdiffstats
path: root/docs/manual/mod/mod_proxy.xml
diff options
context:
space:
mode:
authorRainer Jung <rjung@apache.org>2012-12-14 14:29:31 +0100
committerRainer Jung <rjung@apache.org>2012-12-14 14:29:31 +0100
commitab4ce36c1a0d39b685ec2ee30e63a2eb7e752f54 (patch)
tree701914b920537ad55e68ec5b423fd4988a4a9b45 /docs/manual/mod/mod_proxy.xml
parentArchaelogy. (diff)
downloadapache2-ab4ce36c1a0d39b685ec2ee30e63a2eb7e752f54.tar.xz
apache2-ab4ce36c1a0d39b685ec2ee30e63a2eb7e752f54.zip
Fix use of trailing slashes in proxy
balancer and member URLs and add a little explanation. Current behavior AFAIK: - Any path of a balancer URL inside <Proxy> is ignored. So lets not use e.g.trailing slashes there. The URL should for consistency always look like balancer://mycluster. - The general comment about trailing slashes on the left and right of ProxyPass is also right for balancer use. - Trailing slahes in BalancerMember in most cases lead to double slashes on the origin server. So lets drop them there and instead get the ProxyPass to the balancer right. - Path components in member URLs are only needed, if different path prefixes are needed for members in the same balancer (unlikely but possible). If all members work with the same non-empty additional prefix, put it into the ProxyPass at the end of the balancer instead. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1421851 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/mod/mod_proxy.xml')
-rw-r--r--docs/manual/mod/mod_proxy.xml25
1 files changed, 15 insertions, 10 deletions
diff --git a/docs/manual/mod/mod_proxy.xml b/docs/manual/mod/mod_proxy.xml
index 5c381fb087..8dd5e50dc6 100644
--- a/docs/manual/mod/mod_proxy.xml
+++ b/docs/manual/mod/mod_proxy.xml
@@ -684,6 +684,11 @@ expressions</description>
<p>The balancerurl is only needed when not in <code>&lt;Proxy <var>balancer://</var>...&gt;</code>
container directive. It corresponds to the url of a balancer defined in
<directive module="mod_proxy">ProxyPass</directive> directive.</p>
+ <p>The path component of the balancer URL in any
+ <code>&lt;Proxy <var>balancer://</var>...&gt;</code> container directive
+ is ignored.</p>
+ <p>Trailing slashes should typically be removed from the URL of a
+ <code>BalancerMember</code>.</p>
</usage>
</directivesynopsis>
@@ -707,8 +712,8 @@ expressions</description>
<example>
<highlight language="config">
&lt;Proxy balancer://hotcluster&gt;
- BalancerMember http://www2.example.com:8080/ loadfactor=1
- BalancerMember http://www3.example.com:8080/ loadfactor=2
+ BalancerMember http://www2.example.com:8080 loadfactor=1
+ BalancerMember http://www3.example.com:8080 loadfactor=2
ProxySet lbmethod=bytraffic
&lt;/Proxy&gt;
</highlight>
@@ -1032,7 +1037,7 @@ ProxyPass /mirror/foo http://backend.example.com
</table>
<p>If the Proxy directive scheme starts with the
- <code>balancer://</code> (eg: <code>balancer://cluster/</code>,
+ <code>balancer://</code> (eg: <code>balancer://cluster</code>,
any path information is ignored) then a virtual worker that does not really
communicate with the backend server will be created. Instead it is responsible
for the management of several "real" workers. In that case the special set of
@@ -1129,22 +1134,22 @@ ProxyPass /mirror/foo http://backend.example.com
ProxyPass /special-area http://special.example.com smax=5 max=10
ProxyPass / balancer://mycluster/ stickysession=JSESSIONID|jsessionid nofailover=On
&lt;Proxy balancer://mycluster&gt;
- BalancerMember ajp://1.2.3.4:8009/
- BalancerMember ajp://1.2.3.5:8009/ loadfactor=20
+ BalancerMember ajp://1.2.3.4:8009
+ BalancerMember ajp://1.2.3.5:8009 loadfactor=20
# Less powerful server, don't send as many requests there,
- BalancerMember ajp://1.2.3.6:8009/ loadfactor=5
+ BalancerMember ajp://1.2.3.6:8009 loadfactor=5
&lt;/Proxy&gt;
</highlight>
<p>Setting up a hot-standby, that will only be used if no other
members are available</p>
<highlight language="config">
-ProxyPass / balancer://hotcluster/
+ProxyPass / balancer://hotcluster/
&lt;Proxy balancer://hotcluster&gt;
- BalancerMember ajp://1.2.3.4:8009/ loadfactor=1
- BalancerMember ajp://1.2.3.5:8009/ loadfactor=2
+ BalancerMember ajp://1.2.3.4:8009 loadfactor=1
+ BalancerMember ajp://1.2.3.5:8009 loadfactor=2
# The server below is on hot standby
- BalancerMember ajp://1.2.3.6:8009/ status=+H
+ BalancerMember ajp://1.2.3.6:8009 status=+H
ProxySet lbmethod=bytraffic
&lt;/Proxy&gt;
</highlight>