DOMAINNAME {
root * /wdata
file_server
encode gzip
php_fastcgi unix//run/php/php-version-fpm.sock
file_server
reverse_proxy other-container:8080
This looks wrong, reverse_proxy
must go within a site block. Right now reverse_proxy
is outside your site block.
Are you also running Jellyfin in Docker? If not, then I recommend you run Caddy natively on windows instead of in Docker, it’ll be easier to proxy to Jellyfin that way.
Also you didn’t mention having a PHP site to serve, are you sure you want php_fastcgi
? You shouldn’t just copy-paste any Caddy config you see, you should think about what you need.
Hello! So I’m still a little lost. My path with all my caddy files is:
C:\Program Files\Docker\Docker\docker-caddy
Within the docker-caddy folder are folders: cache, config, data, index.html, sites-enabled, wdata; and files: Caddyfile, docker-compose.yml.
I don’t have a folder just titled ‘caddy’ to contain my Caddyfile, and when I tried making one and moving the file into it, after altering the paths to reflect the new folder, the entire container wouldn’t run and gave an error message that it couldn’t find the specified Caddyfile path.
I did move the reverse_proxy to be inside the site block, now in the line above my }, and removed the line for php. (I am running Jellyfin within a Docker container as well, yeah.)
Now when I go to my domain, the browser gives me an error page and says
What do you mean “all my caddy files”? You should only have a single file called Caddyfile
.
You need to mount that file inside of the container at exactly /etc/caddy/Caddyfile
, which is where Caddy looks for by default.
Read Keep Caddy Running — Caddy Documentation to see our recommended Docker Compose setup. Compare it with what you currently have.
Don’t use old unofficial guides, use the official docs. Guides like the one you linked earlier almost never get updated, so they fall behind and there’s no guarantee that they’re correct.