28 lines
727 B
Plaintext
28 lines
727 B
Plaintext
# Generated by Chef
|
|
|
|
server {
|
|
server_name <%= @domain %>;
|
|
listen <%= "#{node['openresty']['listen_ip']}:" if node['openresty']['listen_ip'] %>443 ssl http2;
|
|
listen [::]:443 ssl http2;
|
|
|
|
root /var/www/<%= @domain %>/public;
|
|
|
|
access_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.access.log;
|
|
error_log <%= node[:openresty][:log_dir] %>/<%= @domain %>.error.log warn;
|
|
|
|
gzip_static on;
|
|
gzip_comp_level 5;
|
|
|
|
add_header 'Access-Control-Allow-Origin' '*';
|
|
|
|
ssl_certificate <%= @ssl_cert %>;
|
|
ssl_certificate_key <%= @ssl_key %>;
|
|
|
|
<% if @accounts_url %>
|
|
location ~ ^/.well-known/(webfinger|nostr|lnurlp|keysend) {
|
|
proxy_ssl_server_name on;
|
|
proxy_pass https://accounts.kosmos.org;
|
|
}
|
|
<% end %>
|
|
}
|