Forum Moderators: phranque

Message Too Old, No Replies

Making a directory so certain people can browse it

         

Glen_S

5:34 pm on May 6, 2011 (gmt 0)

10+ Year Member



First off, new to the group, greetings all.

I have a number of scanned old family images I want to make available for family members to browse and download, so what I thought I would do is just create an "images" folder on one of my domains and make it password protected so when the correct username/pwd was entered then a listing of the directory would show.

The domain itself is running apache on linux, my home test server is running apache (xampp) on W7. In my domain folder I created an .htaccess file to look like this:

AuthUserFile http://mydomain.com/images/.htpasswd
AuthGroupFile /dev/null
AuthName "Secure Document"
AuthType Basic

<LIMIT GET PUT POST>
require user myusername
</LIMIT>


I hit enter to put a blank line at the end of the file, then uploaded it to the folder I want people to have access to.

I then created a .htpasswd file on this site: [tools.dynamicdrive.com...] and uploaded the file to the folder on my site. I was going to use the htpasswd executable on my local machine, but thought the windows encryption would not work on the host.

Anyway, I did create one locally as well, and when I try to access the folder itself, on either the local test or on my domain, I am not getting prompted for a user/password, but am getting a server error, on the localhost its a "error 500"

I am missing something here, can anyone suggest what it may be?

thanks!

phranque

6:23 am on May 7, 2011 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



if you got an error 500 you most likely have a corresponding message in your server error log.

in your case i would assume the problem is that your AuthUserFile directive [httpd.apache.org] should refer to a file-path rather than an http url.