This is what I've done so far:
SiteA is the website where the actual scripts resides
SiteB is the website we want to access scripts from
Code: Select all
ln -s /var/www/vhosts/SiteA/httpdocs/ScriptDir /var/www/vhosts/SiteB/httpdocs/ScriptDir
chown -R SiteBuser:psacln /var/www/vhosts/SiteB/httpdocs/ScriptDir
Code: Select all
Options +FollowSymLinks
php_admin_value open_basedir "/var/www/vhosts/SiteB/httpdocs:/tmp:/usr/share/pear:/var/www/vhosts/SiteA/httpdocs/ScriptDir"
Code: Select all
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=SiteB
If you upload a script to SiteB you can view the code in the php scripts on SiteA with a simple:
Code: Select all
<?php readfile('/var/www/vhosts/SiteA/httpdocs/ScriptDir/ScriptName'); ?>