# apache2ctl -M
then if needed enable rewrite :
# a2enmod rewrite
then create the .htpasswd and .htaccess file like following:
#htpasswd -c .htpasswd test
.htpasswd
test:jrCUxJTvKZW12
.htaccess
AuthUserFile /someNotAccessibleDir/.htpasswd
AuthName "private"
AuthType Basic
require valid-user
Then Change AllowOverride None to AllowOverride All
in the /etc/apache2/sites-enabled
restart apache
cheers Alex Barchiesi
http://www.lxphotostudio.info or http://lxphotostudio.mine.nu
No comments:
Post a Comment