• 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!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    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. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Alias & open_base_dir - Why isn't this simple?

D

desoto0311

Guest
Okay, I've found about 5 or so people with similar problems and posted questions there, but to no avail.

I have several sites that share scripts. I created an alias in vhost.conf (and vhost_ssl.conf) files. I added open_basedir in directory.

What I'm simply trying to do is have an include folder within domain A be shared with domain B, C, etc. I'm half-way there, as I can access the php file, but unfortunately it prompts me to download it instead of parsing it. Not sure at this point what I'm missing. I've tried about 15 or so variations based on other posts but it's simply no cooperating.

Here is my site2 vhost.conf file (complete):

Alias /includes/folder /var/www/vhosts/site1.com/httpdocs/includes/folder

<Directory "/var/www/vhosts/site2.com/httpdocs">
php_admin_value open_basedir var/www/vhosts/site1/httpdocs
</Directory>

Again, the alias "seems" to be working. If I go to site2.com/includes/folder/file.php it's "there" as I can download it, but it's not parsing the PHP. Note that once I add this, I lose the rest of the site; ie site1.com is just blank, which is strange, since if it's a php issue, I'd then think that the index.php page would ALSO prompt for download, right? Assuming the vhost.conf file is overwriting all previous basedir settings.

Also as a test, I set basedir to none. The site would still function then (good), but the page accessed from the /includes/folder directory would still prompt for download.

I've tried modifying with 'ifmodule' , safe_mode, etc ad nauseum and simply cannot get this to work.

I also tried using /includes/folder (full path) in base_dir with same effect. No site, and download prompt.

Any help would be much appreciated.

Thanks,
-D
 
Back
Top