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:
author: Wilfried OLLIVIER
description: Push caddy config file and sync code
description: Push caddy (2) config file and sync code
company: none
license: WTFPL

View File

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