New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Protect subdirectory with .htaccess and .htpasswd
Hi
I want to protect the admin and moderator directory using .htaccess and .htpasswd.
my .htaccess Looks like this
AuthType Basic
AuthName "Password Protected Area"
AuthUserFile /home/eraser/.htpasswd
Require valid-user
my .htpasswd Looks like this
eraser:mypassword
Does anybody have an idea whats wrong with this configuration? I'm some kind of desperate
Thanks in advance,
Comments
htpasswd needs to be generated and does not accept plain-text passwords unless you are on windows server
yes the password is generated with http://www.htaccesstools.com/htpasswd-generator/
AuthConfig directive not enabled for ~ rewrite, most likely.
https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-apache-on-ubuntu-16-04
thank all of you
i used this how-to https://www.digitalocean.com/community/tutorials/how-to-set-up-password-authentication-with-nginx-on-ubuntu-14-04
and it works perfect
next time don't bother sharing essential information in the opening post...