1
I decided to replace Apache2handler with PHP-FPM on my server. After this change, I tried running sudo apache2ctl configtest
and I got the following mistake:
AH00526: Syntax error on line 53 of
/etc/apache2/apache2.conf
: Invalid command 'php_admin_value', Perhaps misspelled or defined by a module not included in the server Configuration Action 'configtest' failed. The Apache error log may have more information.
I know it is possible to make this adaptation through the file www.conf
PHP FPM, but the point is I need it to work for a specific virtualhost, not for everyone.
Example:
#/etc/apache2/sites-avaliable/projeto_x.conf
<Directory /home/servidor/projeto_x>
php_admin_value open_basedir /home/servidor/projeto_x
AllowOverride All
</Directory>
How can I do this configuration via PHP FPM for a specific Vhost?
I think your answer is correct, since in FPM PHP does not run with Apache, but runs via "communication", so there is no way to configure "phpflags" directly via Virtualhosts, you have to configure in FPM. I haven’t tested your answer yet, but it’s very likely to be the right way to FPM.
– Guilherme Nascimento
I believe you are correct too, I used this because in the same system I needed to lock and release the shell_exec, only divided into two hosts that are not well hosts, and disabled in one and the other not, it worked right.
– AnthraxisBR