# caddy.service
#
# For using Caddy with a config file.
#
# Make sure the ExecStart and ExecReload commands are correct
# for your installation.
#
# See https://caddyserver.com/docs/install for instructions.
#
# WARNING: This service does not use the --resume flag, so if you
# use the API to make changes, they will be overwritten by the
# Caddyfile next time the service is restarted. If you intend to
# use Caddy's API to configure it, add the --resume flag to the
# `caddy run` command or use the caddy-api.service file instead.
[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target
[Service]
User=caddy
Group=caddy
ExecStart=/usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
ExecReload=/usr/bin/caddy reload --config /etc/caddy/Caddyfile
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target
I’ve tried looking for solutions, but there aren’t that many running Firefly on Caddy. I found following code for v1, but I can’t seem to modify it to work on v2
Path matching is exact-match in Caddy v2, so matching on /firefly will only match exactly/firefly but not /firefly/foo.
Access logging can only be enabled for an entire hostname, not for specific paths, so enabling log within a path matched subroute will still enable it for the whole hostname regardless.
When Caddy looks for files on disk, it appends the request path to the root path. That means Caddy would be looking for files in /var/www/kraenshomeserver.duckdns.org/firefly-iii/public/firefly, which doesn’t seem right for you. To fix this, the handle_path directive is used, which is the same as handle plus stripping the /firefly prefix from the path before continuing.
try_files logic is already built-in to php_fastcgi, so it’s not necessary to add here.
That error is coming from firefly. You’ll need to dig deeper in that app to figure out what’s going wrong. It’s not a problem with Caddy specifically at this point.