Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Authentication How-to

Status
Not open for further replies.

mufka

ISP
Dec 18, 2000
587
US
Running Apache 1.3.9 on RedHat 6.1. I have a web site which anyone can view. I want to setup so that it prompts for a username and password to access. It looks like O'Reilly says to use AuthType, require, etc. I've put in the following into my httpd.conf:

<Directory /home/website/html/protected>
AuthType Basic
AuthName testname
AuthUserFile /home/httpd/ok_users/testu
AuthGroupFile /home/httpd/ok_users/testg
require user testuser
</Directory>

I'm not sure what the AuthName field should be. I've used htpasswd to create a password for testuser in /home/httpd/ok_users/testu.

When I try to browse to the folder, I get 403 forbidden error. What am I missing.


Thanks for any help.
 
1. &quot;Authname&quot; is just the text used in the login box to describe &quot;what&quot; you're logging into. (Use QUOTES!)

2. Check file and directory permissions to ensure the contents are readable by the user the Web Server's running as.

3. Recommend using &quot;require valid user&quot; vice &quot;require user testuser&quot;, so any valid user in the .htpasswd file will work, and you won't hafta change it later.

-Ted
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top