mirror of
https://github.com/FAUSheppy/athq-vm-management
synced 2025-12-06 13:51:35 +01:00
fix: redirect http->https on acme terminating servers
This commit is contained in:
@@ -9,10 +9,11 @@ server{
|
|||||||
|
|
||||||
{% if acme %}
|
{% if acme %}
|
||||||
include acme-challenge.conf;
|
include acme-challenge.conf;
|
||||||
{% endif %}
|
{% else %}
|
||||||
|
|
||||||
listen 80;
|
listen 80;
|
||||||
listen [::]:80;
|
listen [::]:80;
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if cert_optional %}
|
{% if cert_optional %}
|
||||||
ssl_client_certificate ca_cert.pem;
|
ssl_client_certificate ca_cert.pem;
|
||||||
@@ -42,3 +43,19 @@ server{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{% if acme %}
|
||||||
|
server{
|
||||||
|
|
||||||
|
# {{ comment }}
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
listen [::]:80;
|
||||||
|
|
||||||
|
{% if servernames %}server_name{% for s in servernames %} {{ s }}{% endfor %};{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
include acme-challenge.conf;
|
||||||
|
return 301 https://$host$request_uri;
|
||||||
|
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user