Custom php.ini with Plesk
Aug 13th, 2008 by Steven Lloyd Watkin
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 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/domain.com/conf/vhost.conf





