• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Link directories across domains

J

JoaoCorreia

Guest
Hello,

Any ideas how can I link directories across domains inside httpdocs ?

I have two domains with same content except index.php so I wanted to link several directories across these domains.

Im getting PHP Warning: main(): open_basedir restriction in effect.!


Best regards
Joao Correia
 
You may configure the open_basedir restriction...

Create a vhost.conf file in /var/www/vhosts/yourdomain.com/conf with something like that:
PHP:
<Directory /var/www/vhosts/$domain/httpdocs> 

<IfModule sapi_apache2.c> 
php_admin_flag engine on 
php_admin_flag safe_mode off 
php_admin_value open_basedir 
"/var/www/vhosts/$domain/httpdocs:/var/www/vhosts/$domain/web_users/$user:/var/www/vhosts/$domain/subdomains/$subdomain/httpdocs:/tmp" 
</IfModule> 
<IfModule mod_php5.c> 
php_admin_flag engine on 
php_admin_flag safe_mode off php_admin_value open_basedir 
"/var/www/vhosts/$domain/httpdocs:/var/www/vhosts/$domain/web_users/$user:/var/www/vhosts/$domain/subdomains/$subdomain/httpdocs:/tmp" 
</IfModule> 
</Directory>

This exemple shows how to allow a domain ($domain) to access files in a subdomain-level dir ($subdomain) and a userdir ($user). You just have to modify the path to meet your needs.

Once it has been done, don't forget to reload the conf files via:
/usr/local/psa/admin/sbin/websrvmng -u --vhost-name=$domain

Hope this helps!
 
Back
Top