Jump to content
  • 0

Password protect the Admin folder / admin path with htaccess


Chris van der Westhuizen

Question

Hi All.  When I normally want to protect a folder with a password popup I just add an .htaccess file to that folder containing the standard code. 
But in this case in Blesta it is a virtual path that we setup to be e.g. https://my.domain.com/blesta/manage to go to the admin.

Should I add the .htaccess in /var/www/html/blesta/app/views/admin/default/ maybe?

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You'll have to add to the standard .htaccess file before every request is routed to index.php, checking for the URI (/blesta/manage/ if that's where your route points). I don't have an example, but it wouldn't be difficult to find one.

I would highly recommend instead, just doing the following:

  1. Use a route that is not easy to guess, consider changing it periodically
  2. Most importantly. Have ALL Staff use 2FA. You can download the Google Authenticator for iOS and Android, and use that. Nobody will be able to login as you, even if they had your username and password.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...