Reputation: 193
I have tried it in Magento root
AuthUserFile /home/username/public_html/.htpsswd
AuthType Basic
AuthName "restricted area"
<files "index.php" >
Require valid-user
</files>
I tried to protect access index.php file by .htaccess file by above code
I find base path on AuthUserFile by php code
<?php
echo getcwd();
?>
Here's my .htpsswd file
admin:admin
Everytime I enter password it show popup which ask for password again and again
Upvotes: 1
Views: 38
Reputation: 31
This normally happens when the password is incorrect. Change the contents of your .htpasswd file to:
admin:$apr1$ol.jlx5P$ldshyeA.03GTKJWGFgQYH/
Now you should be able to log in using: username: admin password: admin
If that doesn't work, Check and make sure the path to your .htpasswd file is correct.
Upvotes: 1