more on apache? setting up authentication in .htaccess files

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
hello again. I am trying to setup authentication for my now working web server. >8- )


I have been lead to believe that using .htaccess files will be the easiest way to setup user/pass for sharing certain directories.

so, this is the route I've taken so far. I have setup an .htaccess file in my public_html directory.

.htaccess:
Code:
AuthName Movies

AuthType Basic

AuthUserFile /home/music/users
require valid-user



in the "/home/music" directory I have created a file named "users" (note the local user's name is music, and I want one or more usernames to have access via the webserver)

the user's file contains a single user:pass combination at present

users:
Code:
blah:bPCrm4JeM367E

the "users" file was created using the following command "htpasswd -c users blah" while in the "/home/music" directory.


I have made sure that the permissions on both files allow read/execute for everyone.... however I cannot get the authentication to complete. I get repeated user/pass prompts and if I cancel I will get a 401 error.

screenshot.gif



Can someone give me some tips on getting things working?

thanks again,
-Blake
 

blakerwry

Storage? I am Storage!
Joined
Oct 12, 2002
Messages
4,203
Location
Kansas City, USA
Website
justblake.com
well, I finally got it working... yet another miracle


here's my .htaccess file that works
Code:
AuthUserFile /home/music/public_html/test

AuthName "Music"

AuthType Basic

<limit GET>

require user music

</limit>


and I should thank Ihsan for giving me this bit to add to my httpd.conf file
Code:
#

# AccessFileName: The name of the file to look for in each directory

# for access control information.

#

AccessFileName .htaccess
 
Top