07-23-2002
6,
0
Join Date: Jul 2002
Last Activity: 7 January 2003, 11:54 AM EST
Posts: 6
Thanks Given: 0
Thanked 0 Times in 0 Posts
Directories and Files Protection in Apache Server
Hi everyone, I'm a newbie at this. We have a unix web server which has redhat 7.2 on it. It has apache server hosting our website at the moment. This is what I'm trying to do.
Goal: I'm trying to put reports online so when clients come they can read it and what not. I want only clients viewing their particular folders only and not read others. On the server, there will be a directories of folders of groups number and in those directories are the files. I want a link on the website so that when they click on it, it tells them to put in their user name and password, once they do that, it will take them to their group number. From there, they can do whatever they want, print the file, download the file, etc....
I tried using the .htaccess method but aren't very successful. If someone can help me out with this, I would really appreciate it. I created a .htaccess file in the directory that I want to protect...this is what is in the file:
AuthType Basic
AuthUserFile /var/www/html/test2/.htpasswd
AuthGroupFile /dev/null
AuthName Testing
require valid-user
<Limit GET>
require user temp
</Limit>
and then I created a user name and password and put it inside that folder also. This is what i did next:
htpasswd -c /var/www/html/test2/.htpasswd temp
<enter password twice>
then i place stuff in the folder like a couple of text file, then open up my browser, i could see all the stuff in the folder, it didn't prompt me for a user name/password. Well thats what I did, hopefully someone can help me out.