• 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.

How do I call a file from one domain from another domain ?

W

WebDork

Guest
I have a gallery script hosted on: http://www.domain1.com

I want to be able to use the images from that script on another domain...

So call: /var/www/vhosts/domain1.com/httpdocs/images

from http://www.domain2.com/ with a rewritten php gallery.

It seems that open base prevents this. If we turn it off for domain 2 it works fine.

Does this however open up big security issues ? Is there a smarter way of doing it ?
 
In this case, $domain1 and $domain2 are your domains. We want to open access from $domain2 to files in $domain1...

Create a vhost.conf in /var/www/vhosts/$domain2/conf with the following content:
PHP:
<Directory /var/www/vhosts/$domain2/httpdocs>
<IfModule sapi_apache2.c>
                php_admin_flag engine on
                php_admin_flag safe_mode off
                php_admin_value open_basedir "/var/www/vhosts/$domain2/httpdocs:/var/www/vhosts/$domain1/httpdocs/images:/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/$domain2/httpdocs:/var/www/vhosts/$domain1/httpdocs/images:/tmp"
        </IfModule>
</Directory>

It should do the trick...
More info (in french) here:
http://support.oxegena.ch/index.php?2006/08/27/2-configurer-la-restriction-open_basedir-apache
 
Back
Top