LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Annoying Apache password problems... (http://www.linuxquestions.org/questions/linux-general-1/annoying-apache-password-problems-48706/)

oaaltone 03-07-2003 09:26 AM

Annoying Apache password problems...
 
I've got Apache running on a new server, and set up a password protected directory on the web server at: /var/www/html/secure

Here's the .htaccess file:

AuthUserFile /var/www/.htpasswd
AuthGroupFile /dev/null
AuthName ByPassword
AuthType Basic

require user oliver

I used the following command to create the password file and fill an initial password for user oliver:
htpasswd -c /var/www/.htpasswd oliver

Asks for password, seems to work fine. Looking at the .htpasswd file shows that there is indeed an encrypted password there, like there should be.

The problem is that when I try to access the password protected portion of the site, it rejects my login info and eventually sends me to the Error 401 page.

Any ideas?

EDIT: Yeah, I fixed it. Seems you need to set the owner of the password file to apache (ex: chown apache:apache .htpasswd)


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