.htaccess does not ask the password
- by Sarp Kaya
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.