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/domain.com/conf/vhost.conf

 

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

3 visitors online now
1 guests, 2 bots, 0 members
Max visitors today: 8 at 04:36 am UTC
This month: 31 at 09-06-2017 03:33 pm UTC
This year: 45 at 02-01-2017 10:28 pm UTC
All time: 130 at 28-03-2011 10:40 pm UTC