1. Output of caddy version
:
v2.6.2 h1:wKoFIxpmOJLGl3QXoo6PNbYvGW4xLEgo32GPBEjWL8o=
2. How I run Caddy:
Installed from official repo
a. System environment:
Ubuntu 20.04 LTS
b. Command:
systemctl start caddy
c. Service/unit/compose file:
Paste full file contents here.
caddy.service - Caddy
Loaded: loaded (/lib/systemd/system/caddy.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-01-18 22:10:56 UTC; 11min ago
Docs: https://caddyserver.com/docs/
Main PID: 19290 (caddy)
Tasks: 7 (limit: 1066)
Memory: 8.1M
CGroup: /system.slice/caddy.service
└─19290 /usr/bin/caddy run --environ --config /etc/caddy/Caddyfile
d. My complete Caddy config:
my.domain
{
tls admin@my.domain
encode gzip
root * /var/www/html/
file_server
log {
output file /var/log/caddy/access.log
}
handle /path {
reverse_proxy 127.0.0.1:10020
}
}
3. The problem I’m having:
Caddy spits Error when I reload it.
4. Error messages and/or full log output:
WARN Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 1}
5. What I already tried:
Already tried caddy fmt
and replaced the output but its returning this error
WARN Caddyfile input is not formatted; run the 'caddy fmt' command to fix inconsistencies {"adapter": "caddyfile", "file": "Caddyfile", "line": 2}