Home Guides Glossary

Customizing Script Dir on a Server Running Parallels Plesk Panel

Some of the information in this article is advanced material we make available as a courtesy. Remember, you are responsible for properly following the procedures below. Customer Support cannot assist with these topics.

Parallels Plesk Panelconfigures the httpd.include file for each domain for overall Website security. As such, it enables the open_basedir directive for PHP, so that a script and/or Website can only access files located in the /path/to/vhosts/domain.tld/httpdocs and /tmp directories.

Plesk Version 10.3 and earlier

To overcome this setting, the you need to create a vhost.conf file in your /path/to/vhosts/domain.tld/conf directory, and enter the following lines:

<Directory /home/httpd/vhosts/domainname.com/httpdocs>
php_admin_value
open_basedir "/home/httpd/vhosts/domainname.com/httpdocs:/tmp:/any/other/locations:/they/require" </Directory>

Replace domain.tld with your domain name as it was added in Plesk. Because Linux is case specific you will need to use the correct cases for the letters.

Once you create the file, enter the following command:

/usr/local/psa/admin/bin/websrvmng -a -v

This updates the main httpd.include file to include the new vhost.conf file, and also gracefully restart the Web service, so the changes take effect.

Plesk Version 10.4 and later

  1. Log in to Parallels Plesk Panel as admin. For more information, see Logging in to Your Server.
  2. If necessary, switch to Service Provider view. For more information, see Accessing Service Provider View in Plesk.
  3. Click Domains in the left side menu, and then click Open in Control Panel next to the domain name you want to manage.
  4. Click the Websites & Domains tab, at the top of the screen.
  5. Click the name of the domain that you need to edit.
  6. Click the PHP Settings tab.
  7. Scroll down until you see open_basedir, on the left of the screen, and then select Enter custom value.
  8. Add the needed directories to the current entries.
  9. The list of directories used to limit the files can be opened by PHP. If the file is outside the specified directories, PHP scripts will refuse to open it. To separate directories, use a colon (:) on Linux and a semicolon (;) on Windows. For example, on Linux: /dir/upload:/usr/tmp

  10. Click OK.

    Plesk automatically restarts the Apache instance for your domain and reload the new settings. Test your Website to make sure it is working the way you want it to and make additional changes as needed.

Domain Registration

Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. We have everything you need to get online with your new domain.

Website Builder

Build an amazing website in just under an hour with Website Builder. Take advantage of designs created just for your industry and then customize them to reflect your one-of-a-kind idea.

Website Security

Protect your website and keep customers safe. Your comprehensive Website Security solution. Get peace of mind by securing your websites.

cPanel Hosting

Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with a SSL Certificate
Copyright © 2005 - 2024.  All rights reserved.  Privacy Policy