eEach virtual host with different php cinfiguration

55 views Asked by At

I have two virtualhosts on an apache web server. There is a document root for each of them:

>>/var/www/vhosts/

I set up a php-fpm, now I want to set different open_basedir for each of them. I removed

>>/etc/php.ini

then created two php.ini in different folders. Then to the ini vhost config file I added the code:

PHPINIDir /var/www/vhosts/website1

but when I get phpinfo() nothing is different than before. I think I missed something! How can I force php-fpm to get both php.ini for each virtualhost ?

1

There are 1 answers

2
Fernando Cunha On

You only need a php.ini.

You must add :

php_admin_value open_basedir /OPEN_BASEDIR_FOLDER_HERE

To each VHOST config file.