Page 1 of 1

Protect a webpage director by .htaccess

Posted: Fri May 15, 2015 9:22 am
by Canedje
I try to protect a web page by using .htaccess.
I did make a file .htaccess in the protected directory with the next code:

Code: Select all

AuthUserFile /var/www/thermostaat/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic

<limit GET POST>
require valid-user
</limit>
I di also make an file .htpasswd with an encrypted password.
I did that by using an external website.

The webpage at this directory is still not protected by a password.
What am I doing wrong?

Re: Protect a webpage director by .htaccess

Posted: Fri May 15, 2015 9:54 am
by Laurens-wuyts
Have a look here, it can be helpful. ;)
https://help.ubuntu.com/community/Enabl ... ccessFiles

Laurens

Re: Protect a webpage director by .htaccess

Posted: Fri May 15, 2015 10:16 am
by Canedje
Laurens-wuyts wrote:Have a look here, it can be helpful. ;)
https://help.ubuntu.com/community/Enabl ... ccessFiles

Laurens
Thanks
It is working fine now