upstream colab { server <%= node['peers']['integration'] %>:80 fail_timeout=10s; } server { listen *:80; server_name <%= node['config']['external_hostname'] %>; return 301 https://$server_name$request_uri; } server { listen *:443 ssl; server_name <%= node['config']['external_hostname'] %>; client_max_body_size 150m; ssl on; ssl_certificate /etc/nginx/<%= node['config']['external_hostname'] %>.crt; ssl_certificate_key /etc/nginx/<%= node['config']['external_hostname'] %>.key; ssl_session_cache shared:SSL:10m; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!MD5; ssl_prefer_server_ciphers on; access_log /var/log/nginx/ssl-<%= node['config']['external_hostname'] %>.access.log; error_log /var/log/nginx/ssl-<%= node['config']['external_hostname'] %>.error.log; # TODO caching location / { proxy_pass http://colab; proxy_read_timeout 90; proxy_connect_timeout 90; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_set_header Remote-User ''; proxy_set_header REMOTE_USER ''; } location /doc { root /srv; } }