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
Note that certain directives, for example reverse_proxy which may write a response with an HTTP status which is classified as an error, will not trigger the error routes.
You haven’t shown your logs as requested by the help topic template.
Again, you haven’t shown your logs. Saying it’s “not working” is meaningless without detail. We can’t read your mind. Be specific, explain exactly the behaviour you’re seeing.