34 lines
692 B
Text
34 lines
692 B
Text
|
# ID: {{ id }}
|
||
|
# Service configured by nxa.py
|
||
|
|
||
|
upstream up_{{ id }} {
|
||
|
{%- for upstream in upstreams %}
|
||
|
server {{ upstream }}:{{ port }};
|
||
|
{%- endfor %}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
server_name{% for domain in domains %} {{ domain }}{% endfor %}; # AUTOSSL > {{ id }}
|
||
|
|
||
|
listen 80;
|
||
|
listen [::]:80;
|
||
|
|
||
|
# ssl
|
||
|
include /etc/autossl/gen/{{ 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;
|
||
|
}
|
||
|
|
||
|
}
|