I’ve been using caddy as a lightweight replacement for nginx and really liking the simplicity apart from one annoying thing: the complete lack of feedback!
I just tried to implement the filemanager plugin and it just fails on boot, no error, no log, nothing helpful and I have no idea what’s wrong. I have no idea if this is a problem with my config syntax, my system, the application itself, my letsencrypt account.
Is there a way to enable useful error messages? If so, it should be on by default. I don’t want to spend hours doing trial and error…
The setup is a fresh Ubuntu 16 with a default systemd, installed caddy by the systemd readme, everything else works fine it’s just the fact that it’s not telling me what’s wrong when something goes wrong.
You mention systemd - if you’re using the example unit file from the Caddy repo on Github, it’s already logging to stdout, but it’s being captured by the system logger. You want to check journalctl or service caddy status, from memory.
You might also find the log and errors directives useful, but they pertain to access and errors specific to serving HTTP, not startup.
However, when I boot the service with my filemanager block uncommented, I just get this from journalctl:
Oct 02 19:58:06 southclaws systemd[1]: Started Caddy HTTP/2 web server.
Oct 02 19:58:06 southclaws systemd[1]: caddy.service: Main process exited, code=exited, status=1/FAILURE
Oct 02 19:58:06 southclaws systemd[1]: caddy.service: Unit entered failed state.
Oct 02 19:58:06 southclaws systemd[1]: caddy.service: Failed with result 'exit-code'.
Oct 02 19:58:07 southclaws systemd[1]: caddy.service: Service hold-off time over, scheduling restart.
Oct 02 19:58:07 southclaws systemd[1]: Stopped Caddy HTTP/2 web server.
Oct 02 19:58:07 southclaws systemd[1]: caddy.service: Start request repeated too quickly.
Oct 02 19:58:07 southclaws systemd[1]: Failed to start Caddy HTTP/2 web server.
As far as I can see, there’s no output from the actual Caddy process there, just systemd stuff.