Double check your httpd.conf file, and make sure you have
for at least the directory you want to protect.Code:AllowOverride AuthConfig
I'm trying to get that to work so that the whole world wont download my mp3s and movies but it dosent work. I have .htaccess and .htpassword
.htaccess
.htpasswordCode:AuthUserFile /var/www/downloads/.htpasswd AuthGroupFile /dev/null AuthName Downloads AuthType Basic require valid-user
Code:guest:pejo9ft9AVhKM
Double check your httpd.conf file, and make sure you have
for at least the directory you want to protect.Code:AllowOverride AuthConfig
I've added that and it still dosnt work.. http://gabe.mine.nu/downloads
Try this instead
Code:AuthUserFile /var/www/downloads/.htpasswd AuthGroupFile /dev/null AuthName Downloads AuthType Basic <Limit GET> require user guest </Limit>
I've heard of .htaccess a lot before but never found out what it does. Could someone explain it to me?
It restricts access to web folders. For example you can password protect files on a website that only users who were given a username and password can download or view.I've heard of .htaccess a lot before but never found out what it does. Could someone explain it to me?
Oh, so when I try to access a site and Moz pops up with a login prompt (and I'm not talking about the crappy JavaScript ones, either), that's .htaccess doing it? Cool.It restricts access to web folders. For example you can password protect files on a website that only users who were given a username and password can download or view.
gmoreno:
I attempted to I.M. you this afternoon, did you ever get that working?
I had troubles with this for a long time aswell. My problem wats that my httpd.conf file wasn't configured properly and didn't let the .htaccess files override the default. Right now, I am doing what you would be doing from the .htaccess file right from the httpd.conf file. This can be changed though. But, to make apache let the .htaccess files override the defaults you need to change the httpd.conf files from:
AllowOverride None
to:
AllowOverride All
This will let the .htaccess files override the default security etc. There are also other options you can use instead of None and All, they are briefly mentioned in the httpd.conf file. I hope this helps you out.
Bookmarks