Proxy cache zone static is unknown

Posted by AnApprentice on Server Fault See other posts from Server Fault or by AnApprentice
Published on 2012-11-27T21:33:06Z Indexed on 2012/11/28 5:07 UTC
Read the original article Hit count: 2598

Filed under:

I'm working to setup a reverse proxy cache. In nginx.conf I added the following:

location /blog {
        # Reverse Proxy
        # Cache the Blog Pages from Heroku
        proxy_cache                             STATIC;
        proxy_cache_valid               200     10m;
        proxy_cache_valid               404     1m;
        proxy_cache_use_stale   error timeout invalid_header updating http_500 http_502 http_503 http_504;

        rewrite ^/blog$             /;
        rewrite ^/blog/(.*)$    /$1;

        proxy_pass http://whispering-retreat-1.herokuapp.com;
        break;
}

However when trying to restart nginx I received the following error:

$ /opt/nginx/sbin/nginx -s stop
nginx: [emerg] "proxy_cache" zone "STATIC" is unknown in /opt/nginx/conf/nginx.conf:182

Any ideas what's the problem is with using STATIC? I just want to cache the blog pages so it doesn't hit heroku every time which is horribly slow.

Thanks

© Server Fault or respective owner

Related posts about nginx