Infrastructure/ansible/templates/vhost.caddy.j2

18 lines
401 B
Plaintext
Raw Normal View History

2024-02-17 11:00:06 +02:00
{{ external_url }} {
{% if tls is defined and tls.type != 'auto' %}
{% if tls.type == 'internal' %}
tls internal
{% elif tls.type == 'cloudflare' %}
tls {
dns cloudflare {{ tls.cloudflare_token }}
}
{% elif tls.type == 'file' %}
tls {{ tls.cert }} {{ tls.key }}
{% endif %}
{% endif %}
reverse_proxy {{ proxy_url }}
import vhost-access-log {{ app_name }}
}