1. The problem I’m having:
I can’t have the errors handle to work on my caddyfile.
I tried adding
‘’’
handle_errors {
@404 {
expression {http.error.status_code} == 404
}
rewrite @404 /404.html
}
‘’’
2. Error messages and/or full log output:
I have the default 404 error even if I have a 404.html page made with hugo
3. Caddy version:
Caddyserver v2.6.4 h1 on Docker
4. How I installed and ran Caddy:
Caddyserver2 is running on docker with a docker-compose file
a. System environment:
VPS Linux Ubuntu 20.04.5 LTS
d. My complete Caddy config:
{
email MY@gmail.com
}
www.officinecartografiche.net, officinecartografiche.net {
root * /website
file_server
encode gzip
}
portainer.officinecartografiche.net {
reverse_proxy portainer:9000
}
cloud.officinecartografiche.net {
reverse_proxy owncloud-server:8092
}
lizmap.officinecartografiche.net {
reverse_proxy lizmap_web_1:8080
}