Add public HTTP reverse proxy for LndHub

This commit is contained in:
2021-11-21 13:22:40 -06:00
parent e48cf04e6c
commit 931a3a196f
4 changed files with 51 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
#
# Generated by Chef
#
upstream _lndhub {
server localhost:<%= @port %>;
}
<% if File.exist?(@ssl_cert) && File.exist?(@ssl_key) -%>
server {
listen 443 ssl http2;
server_name <%= @server_name %>;
add_header Strict-Transport-Security "max-age=15768000";
access_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.access.log json;
error_log <%= node[:nginx][:log_dir] %>/<%= @server_name %>.error.log warn;
location / {
proxy_pass http://_lndhub;
}
ssl_certificate <%= @ssl_cert %>;
ssl_certificate_key <%= @ssl_key %>;
}
<% end -%>