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

Basic config issue at caddy startup #590

Open
cocochepeau opened this issue Jan 5, 2025 · 0 comments
Open

Basic config issue at caddy startup #590

cocochepeau opened this issue Jan 5, 2025 · 0 comments

Comments

@cocochepeau
Copy link

cocochepeau commented Jan 5, 2025

Hi. Here is my default config:

(cache) {
        cache {
                redis {
                        url 127.0.0.1:6379
                }
        }
}

*.up2share.site {
        import securityheaders
        import tlsconfig
        import logconfig
        import cache

        root * /mnt/data/www/up2share/prod/public

        handle {
                try_files {path} /index.php
                php_fastcgi unix//run/php/php8.1-fpm.u2s.sock
        }

        encode zstd gzip
}

And here is how I built caddy binary:

xcaddy build \
    --with github.com/caddy-dns/cloudflare \
    --with github.com/WeidiDeng/caddy-cloudflare-ip \
    --with github.com/caddyserver/cache-handler \
    --with github.com/darkweak/storages/redis/caddy

Caddy validates the Caddyfile properly. But this is what I get when starting caddy.service:

Jan 05 16:28:25 tl-02 caddy[1776325]: {"level":"info","ts":1736094505.8401146,"logger":"http.handlers.cache","msg":"Set backend timeout to 10s"}
Jan 05 16:28:25 tl-02 caddy[1776325]: {"level":"info","ts":1736094505.8401768,"logger":"http.handlers.cache","msg":"Set cache timeout to 10ms"}
Jan 05 16:28:25 tl-02 caddy[1776325]: {"level":"info","ts":1736094505.8401988,"logger":"http.handlers.cache","msg":"Souin configuration is now loaded."}
Jan 05 16:28:25 tl-02 caddy[1776325]: Error: loading initial config: loading new config: cache app module: start: Invalid/Incomplete default cache declarat>
Jan 05 16:28:25 tl-02 systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE

Caddy version:

v2.9.0 h1:rteY8N18LsQn+2KVk6R10Vg/AlNsID1N/Ek9JLjm2yE=
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant