Caddyfile:16: input is not formatted with 'caddy fmt'

1. Caddy version (caddy version):

devel
https://github.com/francislavoie/caddy/tree/udp-conn

2. How I run Caddy:

service caddy start

a. System environment:

Linux localhost 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
systemd

b. Command:

service caddy start

c. Service/unit/compose file:

[Unit]
Description=Caddy
Documentation=https://caddyserver.com/docs/
After=network.target network-online.target
Requires=network-online.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

d. My complete Caddyfile or JSON config:

{
        servers :443 {
                protocol {
                        experimental_http3
                }
        }

        servers :80 {
                protocol {
                        allow_h2c
                }
        }
}

jihye.pw www.jihye.pw {
        header {
                Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"
                X-Content-Type-Options nosniff
                X-Frame-Options DENY
                Referrer-Policy no-referrer-when-downgrade
        }
        root * /home/zzori/jihye.pw
        file_server
        encode zstd gzip
        php_fastcgi unix//run/php/php8.0-fpm.sock
}

3. The problem I’m having:

caddy adapt --pretty

4. Error messages and/or full log output:

[WARNING][caddyfile] Caddyfile:16: input is not formatted with ‘caddy fmt’

5. What I already tried:

6. Links to relevant resources:

What’s the question exactly? Did you try running caddy fmt to see what changes it makes to your Caddyfile?

This topic was automatically closed after 30 days. New replies are no longer allowed.