Welcome! Log In Create A New Profile

Advanced

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

February 25, 2014 09:32AM
I use

http{
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.

why?
Subject Author Posted

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

Kurk_SS February 25, 2014 09:32AM

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

Maxim Dounin February 25, 2014 11:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 322
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready