chef/site-cookbooks/kosmos-parity/templates/default/nginx_conf_parity_letsencrypt.erb
Greg Karékinian 2624c09875 Allow to create a package and install a package compiled from GitHub
Also add nginx config for reverse proxying and set up Let's Encrypt
automatically
2017-05-05 19:47:30 +02:00

22 lines
595 B
Plaintext

# Generated by Chef
server {
listen 80; # For Let's Encrypt
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
listen <%= @external_port %> ssl http2;
<% end -%>
server_name <%= @server_name %>;
access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn;
location /.well-known {
root "/var/www/<%= @server_name %>";
}
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
<% end -%>
}