systemshadow200
May 10 2004, 01:06 AM
Hi
i would like to know if it is possible to have one protected directory and have many password file
for example i have a site at abc.com and it allow members from efg.com and xyz.com
assuming all sites are in the same server
I have a website and would like to give pay members from other website i hosting to give access to my website
is it possible to write the .htaccess this way
AuthUserFile /home/httpd/vhosts/efg.com/password/.htpasswd
AuthUserFile /home/httpd/vhosts/abc.com/password/.htpasswd
AuthUserFile /home/httpd/vhosts/xyz.com/password/.htpasswd
in the .htaccess file??
Squire
May 10 2004, 05:52 AM
I've never tried it between domains like that SystemShadow, but you might run into Permission (file ownership) Problems when trying to write to the additional files. For instance, if the script is owned by User1, but the .htpasswd on the 2nd and 3rd sites are owned by User2 and User3, it's likely going to generate an error. So you may have to tweak the owner of the various files to get it to work properly. I'm sure it can be done.
Another way that may work is to simply move the .htpasswd file outside of the sites' web directory so that you don't have to deal with that changing from the vhosts directory on.
Or you could simply set up a cron job to call a script that sync's up all three .htpasswd files several times throughout the day.
systemshadow200
May 10 2004, 11:30 PM
Thanks Squire
all the domains are owned by one owner
How can i get the croin job to call all three .htpasswd several time daily??