Forum: NGINX proxy_cache does not work

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2974d09ac2541e892966b762aad84943?d=identicon&s=25 Nime (Guest)
on 2009-05-28 09:34
(Received via mailing list)
Hello,

I am running nginx 0.7.57 on FreeBSD 7.1 64 bit

I have added following lines to http config:

    proxy_cache_path  /home/nginx/cache levels=1:2 keys_zone=one:10m
max_size=200m;
    proxy_temp_path /home/nginx/temp;

and following in server location:

    location /site/search {
        proxy_pass http://backend;
        proxy_cache             one;
        proxy_cache_key         backend$request_uri;
        proxy_cache_valid       1m;
    }

However, when I reload config and try accessing website, nothing is
being put into cache folders.

Is something obviously wrong in my config and if not, what are the ways
to debug why proxy cache does not work? (i have checked permissions etc.
already)

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2443,2443#msg-2443
5640e332954fc0006aea97a155ce0afd?d=identicon&s=25 Igor Sysoev (Guest)
on 2009-05-28 11:45
(Received via mailing list)
On Thu, May 28, 2009 at 03:27:04AM -0400, Nime wrote:

>
>     location /site/search {
>         proxy_pass http://backend;
>         proxy_cache             one;
>         proxy_cache_key         backend$request_uri;
>         proxy_cache_valid       1m;
>     }
>
> However, when I reload config and try accessing website, nothing is being put into cache 
folders.
>
> Is something obviously wrong in my config and if not, what are the ways to debug why 
proxy cache does not work? (i have checked permissions etc. already)

Does backend returns any "Expires" or "Cache-Control" headers ?
2974d09ac2541e892966b762aad84943?d=identicon&s=25 Nime (Guest)
on 2009-05-28 19:54
(Received via mailing list)
write on spot, Igor, many thanks.... большое спасибо :-)

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,2443,2462#msg-2462
This topic is locked and can not be replied to.