I have followed this to the T and still am unable to get a working password protect directory Apache was installed using:
sudo aptitude install apache2 apache2.2-common apache2-mpm-prefork apache2-utils libexpat1 开发者_运维百科ssl-cert
Contents of htaccess in my /var/www/whatever folder
<IfModule mod_authn_file.c>
AuthType Basic AuthUserFile /var/passwd/.htpasswd AuthName “Mobile Development” require valid-user betachannel IndexIgnore .htaccess Options +Indexes # adding fancy directory indexing IndexOptions +FancyIndexing
</IfModule>
and password for betachannel added using
root@?:/etc/apache2# mkdir /var/passwd
root@?:/etc/apache2# htpasswd -c /var/passwd/.htpasswd betachannel
Adding password for user betachannel
When I visit my page it is as clear as day....?
精彩评论