• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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