Question

I push my website to multiple servers where I have different usernames. I want to have a .htaccess file that password protects a file regardless of which server I'm on.

The issue is that AuthUserFile only takes absolute paths, so if I have:

AuthUserFile /home/will/.htpasswd

I get a server error on a box where my username is wjholcomb (and home directory is /home/wjholcomb/).

Was it helpful?

Solution

.htaccess can have multiple AuthUserFile lines:

AuthUserFile /home/will/.htpasswd
AuthUserFile /home/wjholcomb/.htpasswd
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top