]> git.openstreetmap.org Git - chef.git/blob - cookbooks/tilecache/templates/default/nginx_tile_ssl.conf.erb
Disable gpximport, statistics and cleanup roles on spike-04
[chef.git] / cookbooks / tilecache / templates / default / nginx_tile_ssl.conf.erb
1 upstream tile_cache_backend {
2     server 127.0.0.1;
3     <% @caches.each do |cache| -%>
4     <% if cache[:hostname] != node[:hostname] -%>
5     #Server <%= cache[:hostname] %>
6     <% cache.ipaddresses(:family => :inet, :role => :external).sort.each do |address| -%>
7     server <%= address %> backup;
8     <% end -%>
9     <% end -%>
10     <% end -%>
11
12     keepalive 32;
13 }
14
15 server {
16     listen       443 ssl default_server;
17     server_name  localhost;
18
19     proxy_buffers 8 64k;
20
21     ssl_certificate      /etc/ssl/certs/<%= @certificate %>.pem;
22     ssl_certificate_key  /etc/ssl/private/<%= @certificate %>.key;
23
24     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
25     ssl_ciphers <%= node[:ssl][:ciphers] -%>;
26     ssl_prefer_server_ciphers on;
27     ssl_session_cache shared:SSL:50m;
28     ssl_session_timeout 30m;
29     ssl_stapling on;
30     ssl_dhparam /etc/ssl/certs/dhparam.pem;
31     resolver <%= @resolvers.join(" ") %>;
32
33     location / {
34       proxy_pass http://tile_cache_backend;
35       proxy_set_header X-Forwarded-For $remote_addr;
36       proxy_http_version 1.1;
37       proxy_set_header Connection "";
38     }
39 }