mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 05:41:35 +01:00
37 lines
950 B
Django/Jinja
37 lines
950 B
Django/Jinja
server{
|
|
|
|
# {{ comment }}
|
|
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
|
|
{% if servernames %}server_name{% for s in servernames %} {{ s }}{% endfor %};{% endif %}
|
|
|
|
{% if acme %}
|
|
include acme-challenge.conf;
|
|
listen 80;
|
|
listen [::]:80;
|
|
{% endif %}
|
|
|
|
{% if extra_location %}
|
|
location {{ extra_location["location"] }} {
|
|
{{ extra_location["content"] }}
|
|
{% if extra_location["location-auth"] %}
|
|
auth_basic "{{ extra_location["location-auth"] }}";
|
|
auth_basic_user_file /etc/nginx/{{ extra_location["location-auth"] }}.htpasswd;
|
|
{% endif %}
|
|
}
|
|
{% endif %}
|
|
|
|
location / {
|
|
proxy_pass http://{{ targetip }}:{{ targetport }};
|
|
proxy_set_header Host $http_host;
|
|
{{ proxy_pass_blob }}
|
|
{% if basicauth %}
|
|
auth_basic "{{ basicauth }}";
|
|
auth_basic_user_file /etc/nginx/{{ basicauth }}.htpasswd;
|
|
{% endif %}
|
|
}
|
|
}
|
|
|