.htaccess authentication via domains email account usernames & passwords

brianjking

Active Member
Sep 15, 2009
35
1
58
Chicago, IL
cPanel Access Level
Root Administrator
Twitter
Hello,

I have an issue that I'm trying to sort in a relatively easy way. I hope my explanation below is helpful!

  • site.com
    • Main company website
    • Employee email accounts
  • training-for-site.com
    • 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!
 

brianjking

Active Member
Sep 15, 2009
35
1
58
Chicago, IL
cPanel Access Level
Root Administrator
Twitter

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463

brianjking

Active Member
Sep 15, 2009
35
1
58
Chicago, IL
cPanel Access Level
Root Administrator
Twitter

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
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.