LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache2 .htaccess - Unable To Get Password Prompt. (https://www.linuxquestions.org/questions/linux-software-2/apache2-htaccess-unable-to-get-password-prompt-238740/)

magestic 10-04-2004 03:14 PM

Apache2 .htaccess - Unable To Get Password Prompt.
 
I am unable to get this blasted apache2 to prompt for a password while placing a .htaccess file in the directory i browse to.

I used htpasswd2 -c /home/someuser/password user to make the password file.

then edited httpd.conf

old:

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>

new:

# forbid access to the entire filesystem by default
<Directory />
Options None
AllowOverride AuthConfig
Order deny,allow
Deny from all
</Directory>

then created the .htaccess file

AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/someuser/password
Require user someuser



Can anyone help?

suse 9.1 (ftp install)

eva 10-16-2004 03:05 PM

.... don't use .htaccess files, make a directory statement directly in the httpd.conf file and you'll be fine ... like this:

<Directory /your/directory/with/pw/access>
AuthType Basic
AuthName "Restricted Files"
AuthUserFile /home/someuser/password
Require user someuser
</Directory>

tbergler 10-27-2004 08:49 AM

This is exactly the same behaviour i can see with my Suse91 Apache2.

It seems, the .htaccess files are only evaluated in case i put a <Directory> statement for the procected dir into the conf file and change the access to Deny from all. I'm confused with this behaviour, Apache 1.3 worked different

tb


All times are GMT -5. The time now is 02:46 PM.