• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How do you password protect directories with Apache?

Byte

Platinum Member
I've look at some tutorials, and they are all directed to unix. I'm kinda getting confused with how the directories are used. Can some one give me a sample with windows directories?
 
1. Make sure that apache is setup to use .htaccess and to allow override for user authentication
2. Create an .htpasswd file
3. Create an .htaccess file in the dir that you want to protect that looks like this

---------------------------------------------------------------
AuthUserFile /location of htpasswd file/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require user [username]
---------------------------------------------------------------

You will then add users to the htpasswd file using this command:

htpasswd /location of htpasswd/.htpasswd [username]

Google it...there are a ton of tutorials that will go into more detail

This is for *nix, but I'm sure that the content of the htaccess file will be the same...the procedure may vary a bit
 
Back
Top