Caddyfile-tutorial problem and suggestion

Making my first steps with caddy. So far, happy because in general I find good documentation. Here is nevertheless a suggestion for improvement to Caddyfile Tutorial — Caddy Documentation.

At step adding-functionality, I read:
Save this as caddy.html in the current directory.

But what is my current directory? I don’t know. I found later on that it probably was / . IMO, the tuto should be more specific on finding/specifying the current directory. Or it could introduce the root directive : nice opportunity.

1 Like

Oh, ok – good point. I think we’d normally expect users to understand what the current directory is since that’s more about how to use the terminal; there’s usually a current working directory. This is likely NOT root (/).

But I guess the current wording is ambiguous. I’ll look into being clearer.


May be a word on my setup will clarify what is different from the assumptions of the tuto.

I use a Firefox browser on a Win10 system, while caddy is on a separate Ubuntu+caddy on the local LAN where caddy is run as a service. I use ssh to modify the Caddyfile and reload.

Ok, so yeah in that case your current directory is dictated by the service configuration.

I will say, though, that running Caddy as a service on a remote machine is deviating from the tutorial, which plainly says to run commands yourself on the command line. The tutorials are written with the intention of being followed, so if you follow only some parts of the tutorial, it won’t work. If you want to just do exercises to see if you can get a certain result, that’s fine, but that’s not what the tutorials are for.

(That’s why I don’t love tutorials, tbh, and wouldn’t mind getting rid of them. I think docs should teach principles instead.)

I deviated and I should have not. Fine.
More importantly, do keep the tutorials. They are useful: with them, the user gains confidence. That is important for humans.
I like your documentation, of which I read a lot today, looking for root and log directives in particular.

1 Like

Sounds good, thanks for the feedback!

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