I have a running Apache 2.4 + PHP-FPM setup.
There is one edge case though, when this setup fails - when using Chromelogger. Chromelogger is a server to client debugging tool, which sends it's data through a HTTP header to a browser. The header's value is usually very long, which causes the mod_proxy_fcgi to fail with a following error:
[proxy_fcgi:error] [pid 10452:tid 1912] [client 127.0.0.1:61175] Premature end of script headers: index.php
[proxy_fcgi:error] [pid 10452:tid 1912] [client 127.0.0.1:61175] AH01070: Error parsing script headers
I tried increasing Apache's LimitRequestFieldSize, but it has no effect on this issue.
My setup in short is as follows:
httpd.conf:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_fcgi_module modules/mod_proxy_fcgi.so
...
<Files ~ "\.(php|phtml)$">
SetHandler "proxy:fcgi://127.0.0.1:9072#"
</Files>
php.ini
cgi.fix_pathinfo=0
On a side note: The issue does NOT occur, when PHP is running as a module, but it occurs when PHP is running as non-FPM FastCGI.
The header causing the error is returned on GET requests. "X-ChromeLogger-Data" has a value with length of 18716 characters. The value itself is a base64 encoded json object.
I could not find any variable in either mod_proxy or mod_proxy_fcgi that would increase the header limit.
What am I missing? Is there another Apache variable that would help in this case?
Thank you.