# ID: {{ id }} # Service configured by n_gen.py upstream up_{{ id }} { {%- for upstream in upstreams %} server {{ upstream }}:{{ port }}; {%- endfor %} } server { server_name{% for domain in domains %} {{ domain }}{% endfor %}; # AUTOSSL > {{ id }} listen 443 ssl http2; listen [::]:443 ssl http2; # ssl include /etc/nginx/ssl/{{ id }}.conf; # logging include include/logging-nolog.conf; # Change to "logging-debug" if needed # gzip compression include include/gzip.conf; # security headers include include/security-headers.conf; # reverse proxy location / { proxy_pass {{ proto }}up_{{ id }}; include include/proxy-headers.conf; } } server { listen 80; listen [::]:80; server_name{% for domain in domains %} {{ domain }}{% endfor %}; location ^~ /.well-known/acme-challenge { alias /var/www/dehydrated; } location / { return 301 https://$host$request_uri; } }