URL unknown directive?

SO, I have updated Caddy just today (when this post was made) and when i restarted the service, it gave an error, so i checked journalctl -xe, and it showed this error

-- Unit Caddy.service has finished starting up.
--
-- The start-up result is done.
Dec 31 22:00:44 merith-tk caddy[7887]: /opt/vhosts/merith.conf:2 - Error during parsing: Unknown directive 'www.merith.tk,'
Dec 31 22:00:44 merith-tk systemd[1]: Caddy.service: Main process exited, code=exited, status=1/FAILURE
Dec 31 22:00:44 merith-tk systemd[1]: Caddy.service: Unit entered failed state.
Dec 31 22:00:44 merith-tk systemd[1]: Caddy.service: Failed with result 'exit-code'.

Below is the caddy file for this page,

#WWW Config
www.merith.tk, merith.tk {
    root /opt/www/html
    index index.html
    log /var/log/caddy/merith-tk.log
    errors /var/log/caddy/errors.log

        #Clones from a specific repo
        git {
                repo     gitea@192.168.0.121:merith/merith-tk_homepage.git
                branch   master
                key      /opt/git
                path     /opt/www/html
                interval 120
        }
}

this is the command i used to update caddy
curl https://getcaddy.com | bash -s personal hook.service,http.filemanager,http.forwardproxy,http.git,http.proxyprotocol

Is that your entire caddyfile?

How is this file loaded into Caddy?

What is your OS?

Which Caddy version did you use previously?

1 Like

This is not my entire caddyfile, but its the first chunk of it (the rest look like this, but for different sites.)
OS is ubuntu 16 64bit.

its loaded via import /opt/vhosts/*.conf which has been working fine,

the previous version of caddy i have been using was from about 2 months ago. (Dont know the exact version)

Oh wait. found the issue, one of the configs was broken (forgot a } ) and was treating the other configs as “Configurations” for the one caddyfile.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.