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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.htaccess user authentication problems

Status
Not open for further replies.

alexhob

Programmer
Jan 30, 2004
1
GB
I am trying to using a .htaccess file to password protect some files on my webserver(Mac OSX 10.3). I have followed 3 online tutorials (including apache.org), which all basically said the same thing. I have come up with the following three files and located them all in the root folder of the webserver. However I am receiving no prompt box when I navigate to the root folder. Can anyone explain? Thanks.

.htgroup:
user-list: brett alex

.htpasswd
brett:F22Aa9KWMOWDk
alex:A.1HUhXVGUEEo

.htaccess
AuthUserFile /Users/admin/Sites/.htpasswd
AuthGroupFile /Users/admin/Sites/.htgroup
AuthName Please login
AuthType Basic

<Limit GET>

require group user-list

</Limit>
 
One thing, at least on the way Apple configures Apache... you can't use a URL like this:


Or that won't work. You have to use a real virtual host/subdomain that does not use the ~ method of getting to the directory.

Same goes with CGI processing, SSI processing, etc. So a url like

accesstest.yourdomain.com which is defined in Apache to go to /Users/admin/Sites is the way to test.

Hope this helps!

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top