more modular reverse proxy config
This commit is contained in:
@@ -6,7 +6,13 @@
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ vhost_id }}"
|
||||
block: |
|
||||
{{ vhost_domains | join(' ') }} {
|
||||
reverse_proxy {{ proxy_target }}
|
||||
reverse_proxy {{ proxy_target_protocol }}://{{ proxy_target_host }}:{{ proxy_target_port }} {
|
||||
{% if proxy_target_protocol == 'https' and proxy_target_host == 'localhost' %}
|
||||
transport http {
|
||||
tls_insecure_skip_verify
|
||||
}
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
validate: 'caddy validate --config %s --adapter caddyfile'
|
||||
backup: true
|
||||
|
||||
Reference in New Issue
Block a user