setting multiple PHP_VALUE in Nginx config
When you use Nginx and you want to set PHP settings inside a location block, you use fastcgi_param in combination with PHP_VALUE:
fastcgi_param PHP_VALUE "error_log=\"/path/to/logs/project-name.error\"";
But: you cannot add multiple PHP_VALUE lines, because each will overwrite the previous one:
fastcgi_param PHP_VALUE "error_log=\"/path/to/logs/project-name.error\"";
fastcgi_param PHP_VALUE "auto_prepend_file=\"/path/to/xhprof/header.php\"";
Instead, you must set all values in a single PHP_VALUE, spread over multiple lines:
fastcgi_param PHP_VALUE "error_log=\"/path/to/logs/project-name.error\"
auto_prepend_file=\"/path/to/xhprof/external/header.php\"";
Written by Ramon de la Fuente
Related protips
1 Response
Thanks a lot ...
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Nginx
Authors
reiaguilera
279.6K
jamesdullaghan
90.19K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#