Jump to content

[SOLVED] Password protect folder?


phpcode

Recommended Posts

I'm trying to protect a folder but I cannot get it to work.

 

Heres what is in my htaccess file:

 

AuthUserFile C:\Program Files\Apache Software Foundation\Apache.htpasswd

AuthGroupFile /test

AuthName EnterPassword

AuthType Basic

 

require user test

 

And htpasswd:

 

test:4OCLqrtvRV4w2

 

I've restarted the server but that didn't do anything. Does anyone know what I'm doing wrong?

Link to comment
https://forums.phpfreaks.com/topic/85082-solved-password-protect-folder/
Share on other sites

Since you appear to have access to the whole of the C: drive (Win32) is there a specific reason why you're trying to use .htaccess files? (they're not recommended if you have access to httpd.conf)

 

http://httpd.apache.org/docs/2.0/howto/htaccess.html#when

 

httpd.conf - example password protection

-----------

<Directory c:/wwwroot/private>
Order Allow,Deny
Allow from All
#Disable .htaccess files in this location to help prevent hacking (esp in Win32 Apache)
Allowoverride None
AuthUserFile C:\Program Files\Apache Software Foundation\Apache.htpasswd
AuthGroupFile /test
AuthName EnterPassword
AuthType Basic
Require user test
#Allow from local machine(s)
Allow from 127.0.0.1
Alllow from 192.168.1.
#Use satisfy any or satisfy all - depends on your needs
Satisfy Any
</Directory>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.