29 lines
		
	
	
		
			809 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			809 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #
 | |
| # Generated by Chef
 | |
| #
 | |
| upstream _lndhub {
 | |
|   server <%= @upstream_host || "localhost" %>:<%= @port %>;
 | |
| }
 | |
| 
 | |
| server {
 | |
|   listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
 | |
|   listen [::]:443 ssl http2;
 | |
|   server_name <%= @server_name %>;
 | |
| 
 | |
|   add_header Strict-Transport-Security "max-age=15768000";
 | |
| 
 | |
|   access_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.access.log json;
 | |
|   error_log <%= node[:openresty][:log_dir] %>/<%= @server_name %>.error.log warn;
 | |
| 
 | |
|   location / {
 | |
|     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 | |
|     proxy_set_header X-Forwarded-Proto https;
 | |
|     proxy_set_header Host $http_host;
 | |
|     proxy_redirect off;
 | |
|     proxy_pass http://_lndhub;
 | |
|   }
 | |
| 
 | |
|   ssl_certificate <%= @ssl_cert %>;
 | |
|   ssl_certificate_key <%= @ssl_key %>;
 | |
| }
 |