Update to caddy2

This commit is contained in:
Wilfried OLLIVIER 2020-05-19 21:28:43 +02:00
parent 96fbf95ec1
commit 790f42bbb8
4 changed files with 7 additions and 26 deletions

View file

@ -12,35 +12,18 @@
X-Frame-Options "DENY"
}
proxy / http://{{ reverse_location }}:{{ reverse_port }} {
{% if rootws %}
websocket
{% endif %}
transparent
}
reverse_proxy http://{{ reverse_location }}:{{ reverse_port }}
{% if websocket %}
proxy {{ websocket_path }} http://{{ websocket_location }}:{{ websocket_port }} {
websocket
}
reverse_proxy {{ websocket_path }} http://{{ websocket_location }}:{{ websocket_port }}
{% endif %}
{% if proxy_rule %}
proxy {{ proxy_path }} http://{{ proxy_location }}:{{ proxy_port }} {
transparent
}
reverse_proxy {{ proxy_path }} http://{{ proxy_location }}:{{ proxy_port }}
{% endif %}
log {{ caddy_logs }}/{{ vhost_name }}/access.log {
rotate_size 100
rotate_age 30
rotate_keep 10
}
errors {{ caddy_logs }}/{{ vhost_name }}/errors.log {
rotate_size 100
rotate_age 30
rotate_keep 10
log {
output file {{ caddy_logs }}/{{ vhost_name }}/vhost.log
}
}