Sunday, February 05, 2006

Apacheでユーザー認証(Digest認証)

■Apacheでユーザー認証(Digest認証)
http://www.atmarkit.co.jp/flinux/rensai/linuxtips/699apachedigest.html

# mkdir -p /var/www/html/member
# vi /etc/httpd/conf/httpd.conf
AuthType Digest
AuthName "Secret Zone"
AuthDigestDomain /public_html/
AuthDigestFile /etc/httpd/.htdigest
Require user secret

# htdigest -c /etc/httpd/.htdigest 'Secret Zone' secret
# service httpd restart


#less /etc/httpd/logs/error_log
Digest: uri mismatch - does not match request-uri


IEのバグが原因
http://x68000.q-e-d.net/~68user/net/http-auth-2.html


#vi /etc/httpd/conf/httpd.conf
AuthType Digest
AuthName "Secret Zone"
AuthDigestDomain /public_html/
AuthDigestFile /etc/httpd/.htdigest
Require user secret
# User-Agent ヘッダに MSIE という文字列が含まれていたら、
# 環境変数 AuthDigestEnableQueryStringHack に「On」をセットする。
BrowserMatch "MSIE" AuthDigestEnableQueryStringHack=On

No comments:

Post a Comment