http header doesn't pass throw nginx to php-fpm

Kurk_SS nginx-forum at
Tue Feb 25 14:32:54 UTC 2014

I use

underscores_in_headers on;
ignore_invalid_headers off;

and all works fine. php code can see HTTP_RANGE in $_SERVER array.

but when I use fastcgi cache.

location / {
if ($request_method != GET) { break;} #bad request
try_files @echofile @echofile; #request_uri is a target for download

location @echofile {
include fastcgi_params;
#fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param QUERY_STRING controller=files&target=$request_uri;
fastcgi_param SCRIPT_FILENAME $root_path/index.php;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;

fastcgi_ignore_headers "Expires" "Cache-Control" "Set-Cookie";

fastcgi_temp_path /tmp/dfg12d1 2;
fastcgi_cache dfg12d1;
fastcgi_cache_key "$request_uri";
fastcgi_hide_header "Set-Cookie";
fastcgi_cache_min_uses 1;
#fastcgi_cache_valid 1d;
# using X-Accel-Expires header in php


It not works now.


Posted at Nginx Forum:,247932,247932#msg-247932

More information about the nginx mailing list