Hello everyone:
I need PHP file sharing across multiple domains from a primary domain (I use Plesk 10 with CentOS 6.0).
For example, share the directory: /var/www/vhosts/main_host/httpdocs/shared
To other domains:
/var/www/vhosts/other_host_1
/var/www/vhosts/other_host_2
Therefore, if coming from http://other_host_1/shared you can see the shared PHP code executed on page; the code located on /var/www/vhosts/main_host/httpdocs/shared
I try the next steps, but it always appears Forbidden:
1. Adding /var/www/vhosts/other_host_1/conf/vhost.conf, the following:
<Directory /var/www/vhosts/other_host_1/httpdocs>
<IfModule sapi_apache2.c>
php_admin_value open_basedir /var/www/vhosts/other_host_1/httpdocs/:/tmp/:/var/www/vhosts/main_host/httpdocs/shared/
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir /var/www/vhosts/other_host_1/httpdocs/:/tmp/:/var/www/vhosts/main_host/httpdocs/shared/
</IfModule>
</Directory>
2. Adding a symbolic link in /var/www/vhosts/other_host_1/httpdocs/
ln -s /var/www/vhosts/main_host/httpdocs/shared /shared
I tried creating Alias on vhost.conf (before the Directory tag):
Alias "/shared" "/var/www/vhosts/main_host/httpdocs/shared"
Doing this, you can download the PHP file, but not execute it... therefore, does not work.
Finally, I have also tried: "php_admin_value open_basedir none", without success.
Is there any way to do this? Can you guide me?
Thank you for all your help.
Armando
PD. I saw the following post, but does not work for me (or I don't understand at all) http://forum.parallels.com/pda/index.php/t-63117.html.
I need PHP file sharing across multiple domains from a primary domain (I use Plesk 10 with CentOS 6.0).
For example, share the directory: /var/www/vhosts/main_host/httpdocs/shared
To other domains:
/var/www/vhosts/other_host_1
/var/www/vhosts/other_host_2
Therefore, if coming from http://other_host_1/shared you can see the shared PHP code executed on page; the code located on /var/www/vhosts/main_host/httpdocs/shared
I try the next steps, but it always appears Forbidden:
1. Adding /var/www/vhosts/other_host_1/conf/vhost.conf, the following:
<Directory /var/www/vhosts/other_host_1/httpdocs>
<IfModule sapi_apache2.c>
php_admin_value open_basedir /var/www/vhosts/other_host_1/httpdocs/:/tmp/:/var/www/vhosts/main_host/httpdocs/shared/
</IfModule>
<IfModule mod_php5.c>
php_admin_value open_basedir /var/www/vhosts/other_host_1/httpdocs/:/tmp/:/var/www/vhosts/main_host/httpdocs/shared/
</IfModule>
</Directory>
2. Adding a symbolic link in /var/www/vhosts/other_host_1/httpdocs/
ln -s /var/www/vhosts/main_host/httpdocs/shared /shared
I tried creating Alias on vhost.conf (before the Directory tag):
Alias "/shared" "/var/www/vhosts/main_host/httpdocs/shared"
Doing this, you can download the PHP file, but not execute it... therefore, does not work.
Finally, I have also tried: "php_admin_value open_basedir none", without success.
Is there any way to do this? Can you guide me?
Thank you for all your help.
Armando
PD. I saw the following post, but does not work for me (or I don't understand at all) http://forum.parallels.com/pda/index.php/t-63117.html.