fix: add http-passthrough for non-acme domains

This commit is contained in:
2024-05-21 19:00:05 +00:00
parent ba86d5c482
commit fd61f28cd5
2 changed files with 22 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
{% if terminate_ssl %}
server{
# {{ comment }}
@@ -49,8 +50,8 @@ server{
{% endif %}
}
}
{% endif %}
{% if acme %}
server{
# {{ comment }}
@@ -58,11 +59,23 @@ server{
listen 80;
listen [::]:80;
{% if include_subdomains %}
{% if servernames %}
server_name{% for s in servernames %} ~^.*{{ s.replace(".","\\.") }}{% endfor %};
{% endif %}
{% else %}
{% if servernames %}server_name{% for s in servernames %} {{ s }}{% endfor %};{% endif %}
{% endif %}
{% if acme %}
include acme-challenge.conf;
return 301 https://$host$request_uri;
{% else %}
location / {
{{ proxy_pass_blob }}
proxy_pass http://{{ targetip }}:80;
}
{% endif %}
}
{% endif %}