Custom php.ini with Plesk

By , Wednesday 13th August 2008 3:53 pm

We have a dedicated server with ukFast on which we run a number of domains that exist on virtual servers running under Plesk. Anyway, on most of my domains I want to hide away warnings and for security keep errors to the log files, however on some of my domains (such as those I’m developing on) I want to show every little nasty warning and error that appears.

If I edit my PHP.INI”>php.ini this affects each and every domain on the server, not a good idea especially when several of the sites are fully live versions  So in order to get around this you need to put a file called vhosts.conf in your conf directory, for example, /var/www/vhosts/<my_domain>/conf/vhost.conf.

Once you’ve added your additional code, again for example I included,

php_value error_reporting E_ALL
php_value display_errors On

followed by running the following command (this reconfigures all of your domains its just quicker lazier than typing in the domain name ,

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

If you’re feeling a bit nimble then you can always type out the full version which is,

# /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=<my_domain>

After this command if you look to httpd.include file, will see that your httpd.include will have an include line for your vhost.conf, something like this:

Include /srv/www/vhosts/


Liked this post? Follow this blog to get more. 

Leave a Reply

You must be logged in to post a comment.

Panorama Theme by Themocracy

1 visitors online now
0 guests, 1 bots, 0 members
Max visitors today: 16 at 08:14 am UTC
This month: 17 at 19-09-2017 09:35 pm UTC
This year: 45 at 02-01-2017 10:28 pm UTC
All time: 130 at 28-03-2011 10:40 pm UTC