1. Caddy version (caddy version
):
Tested 2.2.0 and 2.4.0
2. How I run Caddy:
Local environment, Docker
a. System environment:
OS: MacOS 11.3.1, Ubuntu
Docker: 20.10.6 and 19.3.1
b. Command:
caddy run -config Caddyfile
c. Service/unit/compose file:
version: "3.7"
services:
caddy:
build: .
restart: unless-stopped
ports:
- "8000:8000"
volumes:
- $PWD/volume/public:/usr/share/caddy
volumes:
caddy_data:
caddy_config:
d. My complete Caddyfile or JSON config:
Default one has the issue
3. The problem I’m having:
It looks that when serving files Caddy is case sensitive.
We have index.html in our root folder when doing
curl -sSL -D - http://domain/index.html
we get a 200 status code
When executing:
curl -sSL -D - http://domain/INDEX.html
we end up with an error described in logs.
This happens on Linux environment since MacOS file system is not case sensitive.
4. Error messages and/or full log output:
{
"level": "error",
"error": "{id=xsk89h02n} fileserver.(*FileServer).notFound (staticfiles.go:386): HTTP 404",
"first_error": {
"msg": "{id=gdp6s59j4} fileserver.(*FileServer).notFound (staticfiles.go:386): HTTP 404",
"status": 404,
"err_trace": "fileserver.(*FileServer).notFound (staticfiles.go:386)"
}
}
5. What I already tried:
We tried to run:
- Caddy outside Docker
- Caddy on Kubernetes
with the same result.
6. Links to relevant resources:
Looks like we’re having @ryanburnette 's same issue, reopening this.