summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-10-05 09:29:21 -0300
committerSilvio Rhatto <rhatto@riseup.net>2017-10-05 09:29:21 -0300
commit5257e34b64fdd8c5e2f54a7bf20e0e7085cca0e6 (patch)
tree9357f2a36380e56da40592cc84e171b3821475f7 /templates
parent947a8be8355e7aaeb64258ffba30132b411fee2a (diff)
downloadpuppet-nginx-5257e34b64fdd8c5e2f54a7bf20e0e7085cca0e6.tar.gz
puppet-nginx-5257e34b64fdd8c5e2f54a7bf20e0e7085cca0e6.tar.bz2
Adds cache support for SSL-enabled sites
Diffstat (limited to 'templates')
-rw-r--r--templates/site-ssl.erb8
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/site-ssl.erb b/templates/site-ssl.erb
index c0af188..a370bc7 100644
--- a/templates/site-ssl.erb
+++ b/templates/site-ssl.erb
@@ -1,3 +1,6 @@
+<% if @cache == true -%>
+proxy_cache_path /var/cache/nginx/<%= @name %> levels=<%= @cache_levels %> keys_zone=<%= @name %>:<%= @cache_size %> inactive=<%= @cache_inactive %> max_size=<%= @cache_max_size %>;
+<% end -%>
server {
listen 443;
server_name <%= @server_name %> <%= @aliases %>;
@@ -16,5 +19,10 @@ server {
# default proxy pass
proxy_pass http://<%= @backend %>:80;
+<% if @cache == true -%>
+
+ # cache config
+ proxy_cache <%= @name %>;
+<% end -%>
}
}