Answer the question
In order to leave comments, you need to log in
How to assign a PHP.INI for each site or change its parameters through NGINX?
Good time everyone.)) On board is:
nginx
+ php-fpm and two sites, one in CP1251 and the other
UTF
-
8
server{
fastcgi_param PHP_value 'mbstring.func_overload =2
mbstring.internal_encoding = UTF-8';
}
Answer the question
In order to leave comments, you need to log in
In the nginx config, the PHP_VALUE parameters are needed via ; prescribe, rather than separate calls.
For example:
fastcgi_param PHP_VALUE "mbstring.func_overload = 2; mbstring.internal_encoding = UTF-8; max_input_vars = 10000; realpath_cache_size = 4096k";
in the php-fpm config for a specific host we write:
php_admin_value[mbstring.func_overload] = 2
php_admin_value[mbstring.internal_encoding] = UTF-8
as a result we get something like:
[some-host.tld]
listen = ...
...
php_admin_value[mbstring.func_overload] = 2
php_admin_value[mbstring.internal_encoding] = UTF-8
You don’t need to look in the direction of nginx, but in the direction of php-fpm I’ll
try to briefly
nginx works only with static - it proxies dynamics
in the general case on php-fpm sometimes on apache (at least on ISS)
respectively - we make several backend instances on php-fpm with different settings
and in the configs of the nginx hosts we prescribe the necessary instances
. Questions?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question