LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache2 htaccess problem (https://www.linuxquestions.org/questions/linux-server-73/apache2-htaccess-problem-504918/)

ghostz00 11-26-2006 01:07 AM

Apache2 htaccess problem
 
I'm trying to setup a website that you need a password to access and want to use .htaccess to restrict access. But It's pretty much ignoring the script. I'm using a default lamp configuration, with default scripts.

My (/var/www/).htaccess script is:

Code:

AuthType Basic
AuthName "My Server"
AuthUserFile /var/.htpasswd
require user john

Thanks,

gilead 11-26-2006 01:26 PM

Are you getting anything in the Apache access/error logs when you access those pages?

Tralce 11-26-2006 04:01 PM

Try the following:

chmod 777 .htaccess (If you haven't already)

In httpd.conf, made sure AllowOverride is All for /var/www (I think that's what I did)

ghostz00 11-26-2006 11:18 PM

I added two virtual host entry's into the apache2.conf and that immediately took care of my problem.


All times are GMT -5. The time now is 11:57 AM.