Issue #5: Add 'nginx_proxy_cache_path' configuration option.

pull/8/head 1.1.3
Jeff Geerling 10 years ago
parent 200011e4d1
commit 45b749af83
  1. 4
      README.md
  2. 1
      defaults/main.yml
  3. 4
      templates/nginx.conf.j2

@ -36,6 +36,10 @@ This value determines the largest file upload possible, as uploads are passed th
The keepalive timeout. Should be set higher (10s+) if you have more polling-style traffic (AJAX-powered sites especially), or lower (<10s) if you have a site where most users visit a few pages and don't send any further requests.
nginx_proxy_cache_path: ""
Set as the `proxy_cache_path` directive in the `nginx.conf` file. By default, this will not be configured (if left as an empty string), but if you wish to use Nginx as a reverse proxy, you can set this to a valid value (e.g. `"/var/cache/nginx keys_zone=cache:32m"`) to use Nginx's cache (further proxy configuration can be done in individual server configurations).
## Dependencies
None.

@ -6,3 +6,4 @@ nginx_client_max_body_size: "64m"
nginx_keepalive_timeout: "65"
nginx_remove_default_vhost: false
nginx_default_vhost_path: /etc/nginx/sites-enabled/default
nginx_proxy_cache_path: ""

@ -30,5 +30,9 @@ http {
#gzip on;
{% if nginx_proxy_cache_path %}
proxy_cache_path {{ nginx_proxy_cache_path }};
{% endif %}
include /etc/nginx/conf.d/*.conf;
}