28 lines
1007 B
Caddyfile
28 lines
1007 B
Caddyfile
|
{
|
||
|
{% if caddy_caddyfile.global.debug | default(false) %}
|
||
|
debug
|
||
|
{% endif %}
|
||
|
http_port {{ caddy_caddyfile.global.http | default('80') }}
|
||
|
https_port {{ caddy_caddyfile.global.https | default('443') }}
|
||
|
storage file_system {{ caddy_home }}
|
||
|
{% if caddy_caddyfile.global.acme.dns.provider is defined %}
|
||
|
acme_dns: {{ caddy_caddyfile.global.acme.dns.provider }} {{ caddy_caddyfile.global.acme.dns.token | default('') }}
|
||
|
{% endif %}
|
||
|
{% if caddy_caddyfile.global.acme.issuer is defined %}
|
||
|
cert_issuer: {{ caddy_caddyfile.global.acme.issuer }} {{ caddy_caddyfile.global.acme.token | default('') }}
|
||
|
{% endif %}
|
||
|
{% if caddy_caddyfile.global.acme.email is defined %}
|
||
|
email: {{ caddy_caddyfile.global.acme.email }}
|
||
|
{% endif %}
|
||
|
admin off
|
||
|
}
|
||
|
{% for domain in caddy_caddyfile.domains %}
|
||
|
{{ domain.domain }} {
|
||
|
{% if domain.reverse_proxy %}
|
||
|
reverse_proxy {{ domain.reverse_proxy.targets | join(" ") }} {
|
||
|
lb_policy {{ domain.reverse_proxy.lb_policy }}
|
||
|
}
|
||
|
{% endif %}
|
||
|
}
|
||
|
{% endfor %}
|