Deploy akkounts-api behind an nginx reverse proxy with a TLS cert #109
@ -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 -%>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user