Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use cert_issuer zerossl in Global options after upgrade 2.3 #3953

Closed
W0n9 opened this issue Jan 4, 2021 · 2 comments
Closed

Can't use cert_issuer zerossl in Global options after upgrade 2.3 #3953

W0n9 opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels
bug 🐞 Something isn't working
Milestone

Comments

@W0n9
Copy link

W0n9 commented Jan 4, 2021

1. Caddy version (caddy version):

2.3.0

2. How I run Caddy:

Docker

a. System environment:

Docker 19.03.13, Ubuntu 20.04

b. Command:

docker run -itd \
    --name=caddy \
    --net=host \
    --restart=always \
    --ulimit nofile=1048576 \
    -v /etc/caddy/Caddyfile:/etc/caddy/Caddyfile \
    -v /root/caddy/caddy_data:/data \
    -v /root/caddy/caddy_config:/config \
    -v /root/caddy/files:/files \
    caddy

c. My complete Caddyfile or JSON config:

{
    order filter after encode
    on_demand_tls {
        interval 5s
        burst 10
    }
    cert_issuer zerossl api_key
}

catest.buct.edu.cn {
    encode zstd gzip
    respond / {remote_host}{tls_cipher}{tls_version}
    handle_errors {
	    respond "{http.error.status_code} {http.error.status_text}"
    }
    tls {
        on_demand
    }
    header Strict-Transport-Security max-age=31536000;
}

http://course.buct.edu.cn {
    redir https://course-proxy2.buct.edu.cn 303
}

:9180 {
    metrics /metrics
}

3. The problem I'm having:

When I start caddy, it raised an 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:

When I deleted the http block or :9180 block, even cert_issuer zerossl api_key, it returned to normal, but I don`t know what caused it.

6. Link to thread in caddy.community:

https://caddy.community/t/cant-use-cert-issuer-zerossl-in-global-options-after-upgrade-2-3/11002/8

@mholt mholt added the bug 🐞 Something isn't working label Jan 4, 2021
@mholt mholt added this to the v2.3.1 milestone Jan 4, 2021
@mholt mholt self-assigned this Jan 4, 2021
@mholt
Copy link
Member

mholt commented Jan 4, 2021

Thanks for the report. Turns out I was missing one little i-- in the code. Pushing a fix in a moment.

@mholt mholt closed this as completed in 7846bc1 Jan 4, 2021
@mholt
Copy link
Member

mholt commented Apr 2, 2021

Possible regression, see #4101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants