.htaccess does not ask the password
Posted
by
Sarp Kaya
on Server Fault
See other posts from Server Fault
or by Sarp Kaya
Published on 2012-09-14T09:14:28Z
Indexed on
2012/09/15
9:40 UTC
Read the original article
Hit count: 262
I am using Ubuntu 12.04 and trying to use .htaccess on a page with apache2 server on it. My .htaccess file looks like this:
AuthType Basic
AuthName "Password Required"
AuthBasicProvider file
AuthUserFile /home/janeb/.htpasswd
require valid-user
/home/janeb/.htpasswd file is:
inb351:$apr1$Ya4tzYvr$KCs3eyK1O2/c7Q9zRcwn..
and /etc/apache2/sites-available/default file is :
UserDir public_html
<Directory ~ "public_html/.*">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
I restarted apache. I have tried to change require valid-user
to require user inb351
. Still no luck. I also tried AllowOverride
with AuthConfig
and AuthConfig Indexes
. So I don't know what else to do, and yes every step that I have tried I restarted apache.
© Server Fault or respective owner