Answered by the Webhosting Experts

Linux
Managed Services

Just Leave Linux to Us
Is maintaining your Linux server keeping your team bogged down? Alleviate unnecessary stress with one of Hivelocity’s Linux Managed Services plans. With reboots, monitoring, updates, and more, your team can rest easy knowing your hardware and OS are in the hands of hosting experts.

Configure your server today and see the benefits a Hivelocity managed Linux solution can offer you!

Tags
...
...

How to create password protecting directories?

1) Create a .htaccess file and specify the following code in it,

AuthType Basic
AuthName “Adminsitration”
AuthUserFile /home/support/.htpasswd
require valid-user

2) To create a passwd file, use the following .htpasswd generator .It should allow you to generate a

username /  encrypted password pair.

https://www.desilva.biz/apache/pwdweb.html

The .htpasswd file will contain your username(s) and encrypted password(s) and will usually look like this:

christopher:En7Cr9pT2Ed/u
Mak3m0n3y

Place the .htaccess file in the directory that is to be protected.

And place the .htpasswd outside the directory that is to be protected.

Example:
If you want to protect a directory “blog” under a particular domain
then .htaccess file should be placed in the “blog” directory and the .htpasswd
file should be placed in the “html ” directory.

Note that all the directories that are created under the blog directory will also get protected.

Share

Facebook
Twitter
LinkedIn
Email
WhatsApp

Need More Personalized Help?

If you have any further issues, questions, or would like some assistance checking on this or anything else, please reach out to us from your my.hivelocity.net account and provide your server credentials within the encrypted field for the best possible security and support.

If you are unable to reach your my.hivelocity.net account or if you are on the go, please reach out from your valid my.hivelocity.net account email to us here at: support@hivelocity.net. We are also available to you through our phone and live chat system 24/7/365.

Linux
Managed Services

Just Leave Linux to Us
Is maintaining your Linux server keeping your team bogged down? Alleviate unnecessary stress with one of Hivelocity’s Linux Managed Services plans. With reboots, monitoring, updates, and more, your team can rest easy knowing your hardware and OS are in the hands of hosting experts.

Configure your server today and see the benefits a Hivelocity managed Linux solution can offer you!