Jump to content






Photo - - - - -

open_basedir and virtual hosts in PLESK

Posted by rct2·com, 28 September 2009 · 284 views


My mod relies on calling a command line executable. I keep this off the main website folder path to protect it.

But this means that the default PHP open_basedir restriction won't let it run.

The normal way of solving this on a LINUX server is to edit /etc/httpd.conf but in my PLESK environment, it's much more complicated.

Having blogged in the past about PLESK and recommended it, I thought I'd better document how to solve this problem.

  • In /var/www/vhosts/<domain>/conf/ , create a file vhost.conf with the new open_basedir path
  • Restart PLESK with /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<domain>

Editing the 'normal' httpd.conf and PLESK httpd.include is NOT the way to go. Any manual changes to these files are lost the next time the server is rebooted and PLESK restarts. PLESK 'recaches' these files in a similar way to IP.Board, by grabbing 'images' from the MySQL database.




May 2012

S M T W T F S
  12345
6789101112
13141516171819
20 21 2223242526
2728293031  

Search My Blog

Latest Visitors