]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
update
authorJim Jagielski <jim@apache.org>
Thu, 21 Jan 2016 18:58:00 +0000 (18:58 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 21 Jan 2016 18:58:00 +0000 (18:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726065 13f79535-47bb-0310-9956-ffa450edef68

docs/manual/mod/mod_proxy_hcheck.xml

index cfb84f1444d9ec713584a9b91ae26c3b3e0e2e27..6d209094e3181ab8e74d98c6068a8fb3d0d2e25e 100644 (file)
@@ -111,7 +111,24 @@ ProxyPass "/apps"     "http://backend.example.com/" hcexpr=ok234
     </highlight>
     </example>
 
-    <p>NOTE: The expression can use curly-parens ("{}") as quoting deliminators in addition to normal quotes.</p>
+    <p><em>NOTE:</em> The expression can use curly-parens ("{}") as quoting deliminators in addition to normal quotes.</p>
+
+    <p>If using a health check method (eg: <code>GET</code>) which results in a response
+    body, that body itself can be checked via <code>ap_expr</code> using the <code>hc()</code>
+    expression function, which is unique to this module.</p>
+
+    <p>In the following example, we send the backend a <code>GET</code> request
+    and if the response body contains the phrase <em>Under maintenance</em>,
+    we want to disable the backend.</p>
+
+    <example><title>ProxyHCExpr: Checking response body</title>
+    <highlight language="config">
+ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/}
+ProxyPass "/apps"     "http://backend.example.com/" hcexpr=in_maint hcmethod=get hcuri=/status.php
+    </highlight>
+    </example>
+
+    <p><em>NOTE:</em> Since response body can quite large, it is best if used against specific status pages.</p>
 </usage>
 </directivesynopsis>