Problem with fastcgi cache

firestorm nginx-forum at nginx.us
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
MISS):

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:

10.35.9.129 - - [02/Nov/2011:12:41:00 -0400] "GET
/administration.php/school HTTP/1.1" 200 HIT 2712
"http://10.128.50.101/administration.php/school" "Mozilla/5.0 (Windows
NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0" "-"

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,217538,217725#msg-217725



More information about the nginx mailing list