开发者

Not able to create a password protected directory with .htaccess

开发者 https://www.devze.com 2023-03-28 10:49 出处:网络
I have followed this to the T and still am unable to get a working password protect directory Apache was installed using:

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....?

0

精彩评论

暂无评论...
验证码 换一张
取 消