I\'m using systemd to start a caddy webserver on an ubuntu 16.04 machine. Whenever I run sudo service caddy start
and service caddy status
, I get this
In my /etc/systemd/system/caddy.service
file, I had the following line:
Restart=on-failure
Commenting that out (with #
or ;
) and restarting the service showed the underlying problem, which was in my Caddyfile.
EDIT:
service caddy status
only prints a few lines from the log, so sometimes you can find the underlying problem by simply looking at the full log. If using syslog, this is done with:
journalctl -u caddy