Monday, October 09, 2006
authentication for http
step 1: edit /etc/apache2/site-enable/000-default:
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride authconfig
#none for default, authconfig make authen enable
authtype basic
authname 'testing'
authuserfile /etc/apache2/password
#mark the password file location
require user htpass
#"Require valid-user #all valid user" require valid user is default,
step 2: create a password file "password" with a user "htpass":
htpasswd -c /etc/apache2/password htpass
more apache setting in :
http://debian.ha.cn/htmldata/5/2005_10/article_176_1.html
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride authconfig
#none for default, authconfig make authen enable
authtype basic
authname 'testing'
authuserfile /etc/apache2/password
#mark the password file location
require user htpass
#"Require valid-user #all valid user" require valid user is default,
step 2: create a password file "password" with a user "htpass":
htpasswd -c /etc/apache2/password htpass
more apache setting in :
http://debian.ha.cn/htmldata/5/2005_10/article_176_1.html