Labels

Linux (46) network (13) troubleshoot (13) command (10) virtualization (10) ubuntu (9) Windows (8) cisco (7) security (7) router (6) Tools (5) software (5) vmware (5) ospf (3) eigrp (1) zimbra (1)

2010年6月10日

Apache htaccess Digest Authentication config

Suppose the http document directory is /var/www/html
Step 1
Then create .htaccess file in it
vi /var/www/html/.htaccess
AuthName  "myauth"
Authtype  Digest
AuthDigestProvider file
AuthUserFile /etc/httpd/conf.d/.digpass
Require valid-user

Step 2
issue the follow command to create login account
htdigest -c /etc/httpd/conf.d/.digpass myauth tom

ps.: Don't forget to change "AllowOverride AuthConfig" in httpd.conf

沒有留言:

張貼留言