If each host on your server runs in its own PHP-FPM pool, adding fastcgi_param PHP_VALUE ...nginx to one node will not affect the others.
, , nginx PHP-FPM, PHP_VALUE (error_reporting=E_ALL , ). fastcgi_param PHP_VALUE, , , . PHP_VALUE=error_reporting=E_ALL, PHP_VALUE .
, fastcgi_param PHP_VALUE ... ( ).
:
apt install nginx php5-fpm
/etc/nginx/sites-enabled/hosts.conf:
server {
server_name s1;
root /srv/www/s1;
location = / {
include fastcgi.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param PHP_VALUE error_reporting=E_ERROR;
}
}
server {
server_name s2;
root /srv/www/s1;
location = / {
include fastcgi.conf;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}
s1, s2 /etc/hosts
pm static, pm.max_children 1 /etc/php5/fpm/pool.d/www.conf
cat /srv/www/s1/index.php:
<?php var_dump(error_reporting());
systemctl restart php5-fpm && systemctl restart nginx
curl s2 && curl s1 && curl s2
int(22527)
int(1)
int(1)