I would like to use a different PHP.INI file for each site hosted on a shared server.
I have modified the Apache vhosts file for each of the sites, adding the line…
PHPINIDir /srv/www/my-domain.com/
So the vhosts file /etc/apache2/sites-enabled/my-domain.com
now reads thus…
<VirtualHost 123.54.67.89:80>
ServerAdmin me@my-domain.com
ServerName my-domain.com
ServerAlias www.my-domain.com
DocumentRoot /srv/www/my-domain.com/www/
ErrorLog /srv/www/my-domain.com/logs/error.log
CustomLog /srv/www/my-domain.com/logs/access.log combined
PHPINIDir /srv/www/my-domain.com/
</VirtualHost>
On reloading Apache I get the following error.
Syntax error on line 8 of /etc/apache2/sites-enabled/my-domain.com:
Only first PHPINIDir directive honored per configuration tree - subsequent ones ignored
...fail!
Setting the PHPINIDir
directive in just one of the vhosts files works, but then every site picks up that PHP.INI file.
We are running PHP5.3.2 on Ubuntu 10.04.
Any suggestions on how to achieve this?
P.S. The point of this is to have each site generating its own PHP error log.