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