1. The problem I’m having:
Hi I installed Seafile on port :8081 and I’m trying to reverse proxy to it in a way that my subdomain made on Freedns (hadeskincloud.mooo.com) is redirecting to it. Whatever be the tool or way I used it, I always get the same behaving. Last thing tried was caddy on my raspberry pi 3, didn’t work either… My ports 80 and 443 are forwarded, do you know what could cause this issue? I’m tending to guess that it doesn’t have to do with the actual nginx or caddy because the same issue appears for both…
2. Error messages and/or full log output:
Jan 12 12:22:02 hadeskincloud systemd[1]: Starting caddy.service - Caddy...
Jan 12 12:22:02 hadeskincloud caddy[78964]: caddy.HomeDir=/var/lib/caddy
Jan 12 12:22:02 hadeskincloud caddy[78964]: caddy.AppDataDir=/var/lib/caddy/.local/share/caddy
Jan 12 12:22:02 hadeskincloud caddy[78964]: caddy.AppConfigDir=/var/lib/caddy/.config/caddy
Jan 12 12:22:02 hadeskincloud caddy[78964]: caddy.ConfigAutosavePath=/var/lib/caddy/.config/caddy/autosave.json
Jan 12 12:22:02 hadeskincloud caddy[78964]: caddy.Version=2.6.2
Jan 12 12:22:02 hadeskincloud caddy[78964]: runtime.GOOS=linux
Jan 12 12:22:02 hadeskincloud caddy[78964]: runtime.GOARCH=arm64
Jan 12 12:22:02 hadeskincloud caddy[78964]: runtime.Compiler=gc
Jan 12 12:22:02 hadeskincloud caddy[78964]: runtime.NumCPU=4
Jan 12 12:22:02 hadeskincloud caddy[78964]: runtime.GOMAXPROCS=4
Jan 12 12:22:02 hadeskincloud caddy[78964]: runtime.Version=go1.19.8
Jan 12 12:22:02 hadeskincloud caddy[78964]: os.Getwd=/
Jan 12 12:22:02 hadeskincloud caddy[78964]: LANG=en_GB.UTF-8
Jan 12 12:22:02 hadeskincloud caddy[78964]: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
Jan 12 12:22:02 hadeskincloud caddy[78964]: NOTIFY_SOCKET=/run/systemd/notify
Jan 12 12:22:02 hadeskincloud caddy[78964]: HOME=/var/lib/caddy
Jan 12 12:22:02 hadeskincloud caddy[78964]: LOGNAME=caddy
Jan 12 12:22:02 hadeskincloud caddy[78964]: USER=caddy
Jan 12 12:22:02 hadeskincloud caddy[78964]: INVOCATION_ID=95f7da1c1b5845df8e618cf2159237f4
Jan 12 12:22:02 hadeskincloud caddy[78964]: JOURNAL_STREAM=8:738559
Jan 12 12:22:02 hadeskincloud caddy[78964]: SYSTEMD_EXEC_PID=78964
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5568984,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":""}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"warn","ts":1736680922.562871,"msg":"Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":19}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5665138,"logger":"admin","msg":"admin endpoint started","address":"localhost:2019","enforce_origin":false,"origins":["//localhost:2019","//[::1]:2019","//127.0.0.1:2019"]}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"warn","ts":1736680922.5671124,"logger":"http","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.57536,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0x40003145b0"}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5769477,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5769506,"logger":"tls","msg":"cleaning storage unit","description":"FileStorage:/var/lib/caddy/.local/share/caddy"}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5773046,"logger":"tls","msg":"finished cleaning storage units"}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5776944,"msg":"autosaved config (load with --resume flag)","file":"/var/lib/caddy/.config/caddy/autosave.json"}
Jan 12 12:22:02 hadeskincloud caddy[78964]: {"level":"info","ts":1736680922.5779026,"msg":"serving initial configuration"}
Jan 12 12:22:02 hadeskincloud systemd[1]: Started caddy.service - Caddy.
3. Caddy version:
My caddy version is 2.6.2
4. How I installed and ran Caddy:
I found it already installed on my fresh intall lol, so I think it was installed by some sudo apt install caddy way...a. System environment:
I’m on a raspberry pi 3 with raspbian x64 lite, and my containers like seafile are running on docker (not caddy though)
b. Command:
systemctl restart caddy
c. Service/unit/compose file:
d. My complete Caddy config:
http://hadeskincloud.mooo.com {
# Set this path to your site's directory.
root * /usr/share/caddy
# Enable the static file server.
file_server
# Another common task is to set up a reverse proxy:
reverse_proxy 192.168.1.28:8081
# Or serve a PHP site through php-fpm:
# php_fastcgi localhost:9000
}