问题原文
原帖链接 · clime · CC BY-SA 3.0
With apache+php_mod it was as easy as putting:
php_value memory_limit 128M
into application vhost.
How can I do something like this for nginx+php-fpm?
已采纳解答
原帖链接 · growse · CC BY-SA 4.0
You've got a couple of options. You can either:
Set the
fastcgi_paramofPHP_VALUEto be the relevant setting in the nginx configuration:fastcgi_param PHP_VALUE "memory_limit = 128M";Set it via the
php_valuesetting in the FPM pool configuration file. Something likephp_value[memory_limit] = 128M. Usephp_admin_valueif you don't want the setting to be overridable viaini_set.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
