Jump to content


Photo

Current .htaccess Settings - Password Ignored


  • Please log in to reply
1 reply to this topic

#1 xr6vn9z

xr6vn9z
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 24 July 2003 - 04:58 PM

.htpasswd conatins
myusername:encryptedPassword

/htdocs/ is set as the root directory in httpd.conf

.htpasswd is in the htdocs/passwords/ folder.

httpd.conf:
<Directory /catalog/admin>   Options Indexes FollowSymLinks   AllowOverride AuthConfig   order allow,deny   allow from none</Directory>

.htaccess:
AuthUserFile /passwords/.htpasswdAuthName "Restricted Area"AuthType Basic<Limit GET POST>require valid-user</limit>

When I try to access /htdocs/catalog/admin I get the prompt to enter my name and password. I enter the info I specified in the .htpasswd file but the prompt just refreshes.

What is wrong with the settings?

#2 xr6vn9z

xr6vn9z
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 24 July 2003 - 09:53 PM

BTW, I have read every tutorial on .htaccess on the web but it will not work as instructed. I think my problem may be related to the virtual path.

The root folder for Apache is /htdocs. the folder I want to protect with .htaccess is at \"/htdocs/catalog/admin\". Therefore, I am assuming that the following is correct:

In the httpd.conf file I am pointing a directory directive to:
<Directory \"/catalog/admin\">
blah blah
blah blah blah
blah blah
</directory>

In the .htaccess file I am pointing to the password file at:
AuthUserFile /passwords/.htpasswd

Is this correct? Anyone?

I am aware of the Apache tutorial and what it says about having access to the root and not using .htaccess. That is not the point. I want to use .htaccess and there is no reason why I should not be able to. Other people are using it and I would like to nail it before trying an alternative method.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users