: How do I setup authentication on a specific folder using .htaccess? I have a folder that I want to host files privately on my webserver. How do I go about making it password protected using
I have a folder that I want to host files privately on my webserver.
How do I go about making it password protected using .htaccess?
Note: Nothing monolithic, I want something that is simple/easy so setup so me and a few colleagues can download a few files.
More posts by @Samaraweera270
1 Comments
Sorted by latest first Latest Oldest Best
You'll need to create a file called .htpasswd with the content of username:password (you should encrypt that.
Then append this to the htaccesss file:
AuthUserFile /usr/local/you/safedir/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic
require user username
Follow this guide.
Also, here is a tool for generating the encrypted passwords: tools.dynamicdrive.com/password (Thanks to the original poster for the link)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.