• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

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