1. Caddy version (caddy version
): v2.2.1
2. How I run Caddy:
a. System environment:
Ubuntu 20.04, as systemd service (installed with default config from packages)
d. My complete Caddyfile or JSON config:
chlin15-4.ch.dom:80 {
reverse_proxy / 127.0.0.1:9001
file_server /static {
root /opt/PapermergeDMS/static
browse
}
file_server /media {
root /opt/PapermergeDMS/media
browse
}
header /static/admin/css/* {
Content-Type "text/css; charset=utf-8"
}
log {
level warn
}
encode zstd gzip
}
3. The problem I’m having:
CSS isn’t being applied. Looking at the browser console, it seems like all css files are being found (no 404, no other error), however they’re empty. This - of course - is not the case on the server.
4. Error messages and/or full log output:
Browser only reports an “Uncaught ReferenceError: $ is not defined”, which I don’t suspect to stand in relation with this issue.
fetched css files are seemingly empty:
5. What I already tried:
Changed matchers, trying out different formats (/static
, /static/
, /static/*
).
Didn’t help, only resulted in 404 errors.
6. Links to relevant resources:
NGINX-Tutorial for Papermerge:
https://papermerge.readthedocs.io/en/latest/setup/server_configurations.html#step-3-nginx
There are no guides for using caddy, but I wanted to try anyways (obviously).