.htaccess authentication via domains email account usernames & passwords
Hello,
I have an issue that I'm trying to sort in a relatively easy way. I hope my explanation below is helpful!
[LIST]
site.com
[LIST]
Main company website
Employee email accounts
training-for-site.com
[LIST]
Static MkDocs/Sphinx built documentation/training materials (html/css files) that are private for people who WORK FOR site.com
Currently, we just have one login using .htaccess for training-for-site.com that we change the password for if a team member is terminated or quits and then re-distribute the login to the remaining team members.
However, what I'd like to have is the .htaccess file for training-for-site.com authenticate against email addresses and passwords for site.com.
Both site.com and training-for-site.com are both hosted on the same cPanel server.
Any idea if this is possible?
Thanks!
-
Take a look at the Release Notes for cPanel 54, specifically the Subusers section to see if thats something that might work for you: 54 Release Notes - Documentation - cPanel Documentation 0 -
It looks like the passwords are hashed for site.com in /home/site.com/etc/shadow
.0 -
However, what I'd like to have is the .htaccess file for training-for-site.com authenticate against email addresses and passwords for site.com.
Hello :) You could create multiple users and force authentication to a specific URL via the "Password Protect Directories" feature (named "Directory Privacy" in the Paper Lantern theme) in cPanel: Password Protect Directories - Documentation - cPanel Documentation Thank you.0 -
There are no native features in cPanel/WHM that will allow you to combine/manage the "Password Protect Directories" feature for multiple cPanel accounts. However, you could develop a custom script that copies the contents of the /home/$username/.htpasswd file into the same location for the additional account at set times. Thank you. 0
Please sign in to leave a comment.
Comments
6 comments