Problem with fastcgi cache

firestorm nginx-forum at
Wed Nov 2 21:43:22 UTC 2011

Problem solved. The solution was include the statements:

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

I added the configuration to log the cache request result (HIT or

log_format  cache  '$remote_addr - $remote_user [$time_local] "$request"
                      '$status $upstream_cache_status $body_bytes_sent
"$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  logs/access.log  cache;

And now you can see in the log: - - [02/Nov/2011:12:41:00 -0400] "GET
/administration.php/school HTTP/1.1" 200 HIT 2712
"" "Mozilla/5.0 (Windows
NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0" "-"

Posted at Nginx Forum:,217538,217725#msg-217725

More information about the nginx mailing list