Hacker News new | ask | show | jobs
by _def 29 days ago
I guess it saves you the hassle of dealing with reverse proxies and TLS certs if your use case is "userbase is 1 person and it is me, and i only access services from a desktop os"
1 comments

Ever since I started using Caddy, doing that has been soooo easy.

Download the binary, make a Caddyfile

  myservice.example.com {
   basic_auth {
    admin some_password_hash_here
   }
   reverse_proxy :3000
  }
And then just "./caddy start"
Caddy can also proxy to unix sockets !
I just use https://tuns.sh which has a handy bash script to make the ssh tunnel simple
does this work with multiple caddy servers? ie can you bind multiple caddy servers to port 80/443?
You can have multiple configs in a single Caddyfile and reload when you make changes, and it'll just route them as you wish, e.g.

domain1.com -> service on port 1234

domain2.com -> service on port 5678

domain3.com -> serving a file directory.

And then you still access domain1.com, domain2.com, domain3.com on port 80/443

You set up multiple services behind a single caddy reverse proxy