• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • 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.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

PEAR open_basedir

The vhost.conf and vhost_ssl.conf files are not 'automagically' Included into the httpd.include file, you have to create it, then run the following command:

/usr/local/psa/admin/bin/websrvmng -u --vhost-name=domain.com

then restart the apache service.

The Plesk websrvmng script will check for the existence of the files and if found, will then modify the domain's httpd.include file to put the Include line in the file, in the proper place in the file (most of the time).
 
Script for Subdomains

I've modified the script above to add the same support for subdomains.

#!/bin/bash
if [ -f /home/httpd/vhosts/$1/subdomains/$2/conf/vhost.conf ];
then
grep -q pear /home/httpd/vhosts/$1/subdomains/$2/conf/vhost.conf
if [ $? -eq 1 ];
then

cat >> /home/httpd/vhosts/$1/subdomains/$2/conf/vhost.conf <<EOF
<Directory /home/httpd/vhosts/$1/subdomains/$2/httpdocs>
php_admin_value open_basedir /home/httpd/vhosts/$1/subdomains/$2/httpdocs:/tmp:/usr/share/pear
</Directory>
EOF

fi

else

cat > /home/httpd/vhosts/$1/subdomains/$2/conf/vhost.conf <<EOF
<Directory /home/httpd/vhosts/$1/subdomains/$2/httpdocs>
php_admin_value open_basedir /home/httpd/vhosts/$1/subdomains/$2/httpdocs:/tmp:/usr/share/pear
</Directory>
EOF


fi



This can be used for Subdomain Created and Subdomain Updated. Here's the command:


/usr/local/psa/bin/addpear2phpsubdomain.sh <new_domain_name> <new_subdomain_name>

Again, you will have to use the "websrvmng" tool if this is the first time a vhost.conf has been created for this subdomain when updating existing current subdomains.
 
Wanting to clarify host.conf syntax

Perhaps I shouldn't substitute, as I saw in the Plesk knowledgebase, http://kb.swsoft.com/article_41_432_en.html

But, I'm needing to understand the syntax and/or placement.
<Directory /$HTTPD_VHOSTS_D/coldwellbankerdreiling.com/httpdocs>
php_admin_value open_basedir "$HTTPD_VHOSTS_D/coldwellbankerdreiling.com/httpdoc
</Directory>

We're running Plesk 8 on FreeBSD 5.4, and as a web design company, we need a reliable preview (including dynamic content) of client sites before the domain becomes live.

Pre-Plesk 8, we were able, with a symbolic link (i.e. vhosts -> ../../../vhosts/ )in /usr/local/psa/home/vhosts/arsalon.net/httpdocs
to have, for example, http://builder1.arsalon.net/vhosts/acershomes.com/httpdocs/ properly render.

arsalon.net is our ISP, and there'd be multiple sites we'd like to show in this preview manner.
My question about vhost.conf : should I put 1 of those files in each new domain, or do I just need 1 under the arsalon.net?

If I have the vhost.conf under arsalon.net, do I add multiple <Directory> sections, 1 for each distinct domain? If only 1 <Directory> section is allowed, can I list multiple paths? What's the syntax to allow 'word wrap'/2nd lines?

Is there a global way to deactivate open_basedir?
 
Embarrassing Mistake

I accidentally over wrote the default "Physical hosting created" event when trying to setup the event for the addPear2PHP.sh script. could someone please send me the default command that was there before I over wrote it. This is found as earlier described in this post under Server/Events from the plesk admin panel.

Thanks!
 
Back
Top