Link to .htpasswd from accounts with different usernames

I click my site on several servers on which I have different usernames. I want to have a .htaccess file that password protects the file no matter which server I am on.

The problem is that AuthUserFile only accepts absolute paths, so if I have:

 AuthUserFile /home/will/.htpasswd 

I get a server error in the field where my username is wjholcomb (and the home directory is / home / wjholcomb /).

+4
source share
1 answer

.htaccess can have multiple AuthUserFile lines:

 AuthUserFile /home/will/.htpasswd AuthUserFile /home/wjholcomb/.htpasswd 
+5
source

Source: https://habr.com/ru/post/1343862/


All Articles