• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

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