Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Servage control panel – .htpasswd feature

Wednesday, May 13th, 2020 by Helge

lock_cury_2Protecting files on your site from unapproved clients can be significant. Much increasingly significant is the strategy by which you achieve this undertaking. You could utilize PHP to tune in for login approval data on each page, yet that doesn’t ensure your pictures, archives, and other media?

Servage gives you the option to .htaccess secure your websites with a few clicks only!

  • login to servage control panel.
  • click on Domain and Websites and Password Protection option.
  • Select the domain name for which you want to enable password protection.
  • On the right-hand side of the screen there is one green Add button.
  • Then add title and click on folder in which you want to password protect it. After that, you have to set the username and password and click on the add button.
  • What it will do is add that folder to password protected and when you access it will ask for username and password.

But what exactly it happens in the backend? How does password protection work?  The Servage system generates two files the .htaccess file and .htpasswd file and includes automatically the respective code to secure your page.

This is the .htaccess file code:

AuthName “admin”
AuthUserFile /storage/content/xx/xxxxxxx/
AuthGroupFile /dev/null
AuthType Basic
Require valid-user

The above code protects a directory called “admin”. The “AuthUserFile” value is always specific to your hosting configuration.

The .htpasswd file containts this code.


The .htpasswd file contains the usernames and passwords of allowed users one per line. The passwords are MD5 encrypted for security purposes.

Hint: As soon as the .htaccess/.htpasswd files are created, you can adminstrate the protection via your Servage control panel. Just go to “Domain and Websites” -> “Password Protection”, select the domain name for which you want to adminstrate the protection and push the button “Edit”. You can now alter the title of the protection, add users to it and change the password.

If you should have questions related to this post or to any other Servage related subject, please contact us. We provide 24/7 real support via ticket ( or live chat on

Servage control panel – .htpasswd feature, 4.4 out of 5 based on 7 ratings
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.