apache authentication
I have created a user, and within their public_html directory, I have a small site, which I require users to be authenticated prior to gaining access.
Now I have set up the exact same site, which is located at /var/www and it works fine, but when I try to get it to authnticate using .htpasswd and .htaccess while using the fomat www.mydomain/~user/ it simply does not even ask for a user/pass. As it works as expected in the /var/www location, then I would assume my .htaccess and .htpasswd files are configured properly. Any ideas? |
This might have something to do with your AllowOveride directive in httpd.conf. You have to specify that httpd.conf may be overided by .htaccess files.
Look for something like this: Code:
... |
Cool, that seemed to do it...
I didn't know that you had to explicitly define parameters for different directories. I obviously had the parameters etc for /var/www but not for /home/user/public_html or whatever. Cheers mate... |
Glad it works. Usually all apache directives work recursively from your document root but I guess that the ~user directory needs to be explicitly defined.
|
All times are GMT -5. The time now is 03:18 AM. |