Deploy akkounts-api behind an nginx reverse proxy with a TLS cert #109

Manually merged
raucao merged 7 commits from feature/18-akkounts-api into master 2019-10-18 12:31:40 +00:00
Showing only changes of commit 2c20fa4a2f - Show all commits

View File

@ -1,23 +1,15 @@
# Generated by Chef
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
upstream _akkounts {
server localhost:<%= @port %>;
}
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
listen 443 ssl http2;
add_header Strict-Transport-Security "max-age=15768000";
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
<% else -%>
listen 80;
<% end -%>
server_name <%= @server_name %>;
@ -33,3 +25,4 @@ server {
}
}
<% end -%>