Update to caddy2

This commit is contained in:
Wilfried OLLIVIER 2020-05-19 21:27:29 +02:00
parent 2912d3d3c2
commit 3907b9a1bf
2 changed files with 15 additions and 19 deletions

View File

@ -1,6 +1,6 @@
galaxy_info: galaxy_info:
author: Wilfried OLLIVIER author: Wilfried OLLIVIER
description: Push caddy config file and sync code description: Push caddy (2) config file and sync code
company: none company: none
license: WTFPL license: WTFPL

View File

@ -12,27 +12,23 @@
X-Frame-Options "DENY" X-Frame-Options "DENY"
} }
log {{ caddy_logs }}/{{ vhost_name }}/access.log { log {
rotate_size 100 output file {{ caddy_logs }}/{{ vhost_name }}/vhost.log
rotate_age 30
rotate_keep 10
} }
errors {{ caddy_logs }}/{{ vhost_name }}/errors.log { root * {{ caddy_www }}/{{ vhost_name }}
rotate_size 100 file_server
rotate_age 30 encode zstd gzip
rotate_keep 10
{% if custom_errors %}
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
file_server
} }
{% endif %}
root {{ caddy_www }}/{{ vhost_name }}
gzip
{% if custom_errors %}
errors {
404 404.html # Not Found
}
{% endif %}
} }