LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   .htaccess password protection not working (https://www.linuxquestions.org/questions/linux-newbie-8/htaccess-password-protection-not-working-730010/)

m0ntassar 06-01-2009 09:52 PM

.htaccess password protection not working
 
I have an apache2 install on a debian etch box, and I'd like to protect my www with htaccess password
first, I created a file I called .htpasswd on a secure location with
Code:

htpasswd -c .htpasswd username
then I created a .htaccess file on my www containing :

Code:

AuthUserFile path to my /.htpasswd
AuthGroupFile /dev/null
AuthName "EnterPassword"
AuthType Basic

require valid-user

when I try to access to a page stored in www, i dont get the dialog box, the page is displayed without restruction, I'd like to know whether there is something else I should consider to make password protection working ?

billymayday 06-01-2009 10:01 PM

Try adding

AllowOverride AuthConfig

Is there anything in your logs?

paul81 06-03-2009 06:31 AM

Like billymayday says: you need to allow your webpage to use .htaccess files. Enter the directive AllowOverride AuthConfig in your Apache configuration for your website (and don't forget to restart Apache afterwards).

m0ntassar 06-04-2009 02:02 PM

thank you guys, it works


All times are GMT -5. The time now is 04:09 AM.