From: Jim Jagielski Date: Thu, 21 Jan 2016 18:58:00 +0000 (+0000) Subject: update X-Git-Tag: 2.5.0-alpha~2318 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1565938de05f9bcb406ef78e0b7ea4552b41eb07;p=thirdparty%2Fapache%2Fhttpd.git update git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1726065 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/mod/mod_proxy_hcheck.xml b/docs/manual/mod/mod_proxy_hcheck.xml index cfb84f1444d..6d209094e31 100644 --- a/docs/manual/mod/mod_proxy_hcheck.xml +++ b/docs/manual/mod/mod_proxy_hcheck.xml @@ -111,7 +111,24 @@ ProxyPass "/apps" "http://backend.example.com/" hcexpr=ok234 -

NOTE: The expression can use curly-parens ("{}") as quoting deliminators in addition to normal quotes.

+

NOTE: The expression can use curly-parens ("{}") as quoting deliminators in addition to normal quotes.

+ +

If using a health check method (eg: GET) which results in a response + body, that body itself can be checked via ap_expr using the hc() + expression function, which is unique to this module.

+ +

In the following example, we send the backend a GET request + and if the response body contains the phrase Under maintenance, + we want to disable the backend.

+ + ProxyHCExpr: Checking response body + +ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/} +ProxyPass "/apps" "http://backend.example.com/" hcexpr=in_maint hcmethod=get hcuri=/status.php + + + +

NOTE: Since response body can quite large, it is best if used against specific status pages.