Is this possible? I do have port 22 open at the relevant subdomains and pointing to the machine with caddy. I get this error from systemd:
2016/10/07 23:10:25 listen tcp :22: bind: address already in use
I followed google to #316 on github, where Matt requested the output of caddy -log stderr. Here’s mine:
2016/10/07 23:10:53 [ERROR] Unable to make new certificate storage path: mkdir /home/keith/.caddy/acme: permission denied
Please follow instructions at:
https://github.com/mholt/caddy/issues/902#issuecomment-228876011
OK, well, uh, that makes no sense at all. The timestamp seems to indicate that the errors are related. But the instructions at that link just ask me to move ~/.caddy/letsencrypt to ~/.caddy/acme. But only ~/.caddy/acme exists, and the permissions show that it’s already owned by user caddy and in group caddy.
I’m baffled. Did I find a bug? Or am I trying to do the impossible?
Caddy doesn’t know how to proxy SSH – it’s not a raw TCP proxy; the proxy directive of the HTTP server is an HTTP proxy.
What version of Caddy are you running, and did you just upgrade? Looks like your system has some permissions misconfigured. (The two errors are probably unrelated.)
$ caddy -log stderr
2016/10/08 12:38:22 [ERROR] Unable to make new certificate storage path: mkdir /home/keith/.caddy/acme: permission denied
Please follow instructions at:
https://github.com/mholt/caddy/issues/902#issuecomment-228876011
I was under the impression that this command would just display logs. But when I ran it as root or caddy, it started a server instance. That makes sense then: my user doesn’t have permission to run caddy. That’s intentional. Systemd starts it with User=caddy.
Great, glad you fixed it by upgrading. Caddy doesn’t display logs, it just writes them, -log stderr says to write logs to stderr. But if you want to display a file for example, you have to use something like cat or tail or a text editor.