Update to caddy2
This commit is contained in:
parent
2912d3d3c2
commit
3907b9a1bf
2 changed files with 15 additions and 19 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
root {{ caddy_www }}/{{ vhost_name }}
|
file_server
|
||||||
|
|
||||||
gzip
|
|
||||||
|
|
||||||
{% if custom_errors %}
|
|
||||||
errors {
|
|
||||||
404 404.html # Not Found
|
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue