Custom settings with PHP

Igor Sysoev igor at
Fri Jun 18 16:31:13 MSD 2010

On Fri, Jun 18, 2010 at 08:23:16AM -0400, jbruni wrote:

> [b][color=#FF0000]UPDATE[/color][/b]
> Now, it is possible to do this way:
> [code]
> fastcgi_param  PHP_VALUE  "upload_max_filesize=5M";
> [/code]
> More information here:
> Using this technique, I have successfully set different "error_log"
> locations for multiple virtual hosts.

One note, you should not concatenate using "set":

  set $php_value "pcre.backtrack_limit=424242";
  set $php_value "$php_value \n pcre.recursion_limit=99999";
  fastcgi_param  PHP_VALUE $php_value;

You can do it just in place:

  fastcgi_param  PHP_VALUE "pcre.backtrack_limit=424242 \n pcre.recursion_limit=99999"


  fastcgi_param  PHP_VALUE "pcre.backtrack_limit=424242

or to minimize spaces:

  fastcgi_param  PHP_VALUE "pcre.backtrack_limit=424242

Igor Sysoev

More information about the nginx mailing list