You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 2016/08/01 11:48:14 UTC

Re: [users@httpd] Hcheck module can not get the parameter of hcuri

Let me take a look at this...

> On Jul 29, 2016, at 7:26 PM, mb19890630@126.com wrote:
> 
> Hi Lars,
> 
> I am using the apache http server to proxy the request from brower and load balancer, the version is 2.4.23, also I am working with module named mod_proxy_hcheck to check the worker healthy, but I am failed, I have do a lot of work to check the configuration and solution, but it is not use, so can you help me to find the problem, Because this function is the lastest, 
> also I can not find the answer from internet.
> 
> This is the core configuration below(you can also find this in the attachment):
> <VirtualHost *:80>
>     ServerAdmin webmaster@localhost
>     DocumentRoot "/usr/local/apache/htdocs"
>     ServerName localhost
>     ServerAlias localhost
>     ProxyPass /examples/servlets/ balancer://cluster/examples/servlets/
>     ProxyPassReverse /examples/servlets/ balancer://cluster/examples/servlets/
>     ErrorLog "logs/dummy-host2.example.com-error_log"
>     CustomLog "logs/dummy-host2.example.com-access_log" common
> </VirtualHost>
> 
> ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
> ProxyHCExpr ok23 {%{REQUEST_STATUS} =~ /^[5]/}
> #ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/}
> ProxyRequests Off
> 
> <proxy balancer://Testcluster>
>     BalancerMember http://localhost:8181/examples/servlets loadfactor=1 hcmethod=GET hcexpr=ok234 hcinterval=15 hcuri=/status.php
>     BalancerMember http://localhost:8282/examples/servlets loadfactor=1 hcmethod=GET hcexpr=ok23 hcinterval=15 hcuri=/check
>     ProxySet lbmethod=byrequests
> </proxy>
> 
> #ProxyPass "/" "balancer://cluster"
> #ProxyPassReverse "/" "balancer://cluster"
> 
> <Location /balancer-manager>
> SetHandler balancer-manager
> Order Deny,Allow
> Deny from all
> Allow from all
> </Location>
> 
> But I find the log in tomcat, the result is :
> 127.0.0.1 - - [29/Jul/2016:23:07:40 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:07:56 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:08:12 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:08:28 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:08:44 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:09:00 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 
> It looks like the parameter "hcuri=/status.php" or "/check" does not affect.
> 
> Can you help me to find the problems? I can not find the answer from document in the official website.
> 
> Thank you very much!
> 
> Best Regards.
> Bin
> 
> <httpd.conf><httpd-info.conf><httpd-vhosts.conf>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Re: [users@httpd] Hcheck module can not get the parameter of hcuri

Posted by "mb19890630@126.com" <mb...@126.com>.
Hi Jim,

Do you have any progress about this problem? Thank you!

Best Regards
Bin

From: Jim Jagielski
Date: 2016-08-01 19:48
To: users
Subject: Re: [users@httpd] Hcheck module can not get the parameter of hcuri
Let me take a look at this...
 
> On Jul 29, 2016, at 7:26 PM, mb19890630@126.com wrote:
> 
> Hi Lars,
> 
> I am using the apache http server to proxy the request from brower and load balancer, the version is 2.4.23, also I am working with module named mod_proxy_hcheck to check the worker healthy, but I am failed, I have do a lot of work to check the configuration and solution, but it is not use, so can you help me to find the problem, Because this function is the lastest, 
> also I can not find the answer from internet.
> 
> This is the core configuration below(you can also find this in the attachment):
> <VirtualHost *:80>
>     ServerAdmin webmaster@localhost
>     DocumentRoot "/usr/local/apache/htdocs"
>     ServerName localhost
>     ServerAlias localhost
>     ProxyPass /examples/servlets/ balancer://cluster/examples/servlets/
>     ProxyPassReverse /examples/servlets/ balancer://cluster/examples/servlets/
>     ErrorLog "logs/dummy-host2.example.com-error_log"
>     CustomLog "logs/dummy-host2.example.com-access_log" common
> </VirtualHost>
> 
> ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}
> ProxyHCExpr ok23 {%{REQUEST_STATUS} =~ /^[5]/}
> #ProxyHCExpr in_maint {hc('body') !~ /Under maintenance/}
> ProxyRequests Off
> 
> <proxy balancer://Testcluster>
>     BalancerMember http://localhost:8181/examples/servlets loadfactor=1 hcmethod=GET hcexpr=ok234 hcinterval=15 hcuri=/status.php
>     BalancerMember http://localhost:8282/examples/servlets loadfactor=1 hcmethod=GET hcexpr=ok23 hcinterval=15 hcuri=/check
>     ProxySet lbmethod=byrequests
> </proxy>
> 
> #ProxyPass "/" "balancer://cluster"
> #ProxyPassReverse "/" "balancer://cluster"
> 
> <Location /balancer-manager>
> SetHandler balancer-manager
> Order Deny,Allow
> Deny from all
> Allow from all
> </Location>
> 
> But I find the log in tomcat, the result is :
> 127.0.0.1 - - [29/Jul/2016:23:07:40 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:07:56 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:08:12 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:08:28 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:08:44 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 127.0.0.1 - - [29/Jul/2016:23:09:00 +0800] "GET /examples/servlets HTTP/1.0" 302 -
> 
> It looks like the parameter "hcuri=/status.php" or "/check" does not affect.
> 
> Can you help me to find the problems? I can not find the answer from document in the official website.
> 
> Thank you very much!
> 
> Best Regards.
> Bin
> 
> <httpd.conf><httpd-info.conf><httpd-vhosts.conf>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
 
 
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org