When I start caddy, it raised a error,which is loading config: loading new config: loading tls app module: tls: invalid configuration: automation policy 2 is the second policy that acts as default/catch-all, but will never be used
4. Error messages and/or full log output:
{"level":"info","ts":1609670773.2256284,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"} reload: sending configuration to instance: caddy responded with error: HTTP 400: {"error":"loading config: loading new config: loading tls app module: tls: invalid configuration: automation policy 2 is the second policy that acts as default/catch-all, but will never be used"}
5. What I already tried:
I delete cert_issuer zerossl api_key in the Caddyfile, it works, but I just want to use zerossl as my cert issuer
I’m not sure. Your config works for me. And it only produces 2 automation policies (positions 0 and 1), not 3 (positions 0 through 2). How can we reproduce the error?
I build v2.3.0 in docker via caddy:builder, and when I executed docker exec -it caddy caddy version it returned v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
Here is my Dockerfile.
FROM caddy:builder AS builder
ENV GO111MODULE on
ENV GOPROXY https://goproxy.cn
RUN xcaddy build v2.3.0\
--with github.com/sjtug/caddy2-filter
FROM caddy:latest
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
Thanks, we do need the full Caddyfile in order to help.
Can you please file a bug on GitHub? So it won’t be forgotten about. Be sure to post your complete Caddyfile and link to this thread for context. Thank you!