I just noticed something…
caddy/caddy:latest
isn’t actually v2.5.1
but instead v2.0.0-rc.3
You can test that yourself with
❯ docker run -it --rm caddy/caddy:latest caddy version
v2.0.0-rc.3 h1:z2H/QnaRscip6aZJxwTbghu3zhC88Vo8l/K57WUce4Q=
Please use caddy:latest
instead of caddy/caddy:latest
❯ docker run -it --rm caddy:latest caddy version
v2.5.1 h1:bAWwslD1jNeCzDa+jDCNwb8M3UJ2tPa8UZFFzPVmGKs=
There was fastcgi: Comply with RFC3875, ensure a leading slash on index rewrite by francislavoie · Pull Request #3570 · caddyserver/caddy · GitHub merged in v2.2.0
, which might just fix your problem, though I didn’t look at grav’s source code that closely
Before that, caddy wrongly passed SERVER_PORT=""
(empty string) for the php_fastcgi
directive instead of omitting it. The very var, grav just converts down to an integer if set (0
for an empty string).
If your problem persists, would you mind sharing the Dockerfile for your php container and some (perhaps stripped) grav config?