Is there way to setup Web monitoring for web site protected with Apache Digest Authentication?
I can get normal response from such a site using any browser through http://'user':'pass'@site.com/index or doing the same with curl:
curl -I --digest http://'user':'pass'@site.com/index
HTTP/1.1 401 Authorization Required
Date: Tue, 24 Dec 2013 14:26:37 GMT
Server: Apache
WWW-Authenticate: Digest realm="Realm", nonce="nT44iEjuBAA=5b87dc167dce728dcdab948fafbc7b3 826e2c1a2", algorithm=MD5, domain="/", qop="auth"
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 OK
Date: Tue, 24 Dec 2013 14:26:37 GMT
Server: Apache
Authentication-Info: rspauth="8f74d38ed4d4ccd245a1be7764ba5847", cnonce="MTcwNzI0", nc=00000001, qop=auth
X-Powered-By: PHP/5.2.6-1+lenny9
Vary: Accept-Encoding
Content-Type: text/html
If I will remove "-I" from curl command above, I will get full contents of the "index" page I had requested.
Unfortunately, when I set Web check using the same URL request I get to the first 401 response and seems to not be able pass authentication.
I do not get final 200 response on the first request as it shown on second part of curl output.
Neither does any consequent request in step 2 which, if auth would be passed in step 1, was supposed to get status code 200 and allow check "index" page contents.
So the step 2 to the same URL gets the same 401 response.
Am I missing something?
Or maybe there is other way to verify that page contents by Zabbix?
I can get normal response from such a site using any browser through http://'user':'pass'@site.com/index or doing the same with curl:
curl -I --digest http://'user':'pass'@site.com/index
HTTP/1.1 401 Authorization Required
Date: Tue, 24 Dec 2013 14:26:37 GMT
Server: Apache
WWW-Authenticate: Digest realm="Realm", nonce="nT44iEjuBAA=5b87dc167dce728dcdab948fafbc7b3 826e2c1a2", algorithm=MD5, domain="/", qop="auth"
Vary: Accept-Encoding
Content-Type: text/html; charset=iso-8859-1
HTTP/1.1 200 OK
Date: Tue, 24 Dec 2013 14:26:37 GMT
Server: Apache
Authentication-Info: rspauth="8f74d38ed4d4ccd245a1be7764ba5847", cnonce="MTcwNzI0", nc=00000001, qop=auth
X-Powered-By: PHP/5.2.6-1+lenny9
Vary: Accept-Encoding
Content-Type: text/html
If I will remove "-I" from curl command above, I will get full contents of the "index" page I had requested.
Unfortunately, when I set Web check using the same URL request I get to the first 401 response and seems to not be able pass authentication.
I do not get final 200 response on the first request as it shown on second part of curl output.
Neither does any consequent request in step 2 which, if auth would be passed in step 1, was supposed to get status code 200 and allow check "index" page contents.
So the step 2 to the same URL gets the same 401 response.
Am I missing something?
Or maybe there is other way to verify that page contents by Zabbix?
Comment