Mobile app version of vmapp.org
Login or Join
Samaraweera270

: 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

@Samaraweera270

Posted in: #Authentication #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 .htaccess?

Note: Nothing monolithic, I want something that is simple/easy so setup so me and a few colleagues can download a few files.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Samaraweera270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Fox8124981

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)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme