Lurker News

Comments (240) 58 threads

Earlier comments
Tomte1 reply#
Does Caddy request separate certificates for domains served through it, or is it handled using SANs?
mholt1 reply#
Both, technically.

CommonName has been deprecated for years, so all of Caddy's certificates (and all of Let's Encrypt's) are SAN certificates. Caddy manages single-SAN certs, in accordance with recommended best practices: https://docs.https.dev/acme-ops#use-one-name-per-certificate
(We learned from experience that single SAN scales better and is less prone to troubles. For example, Caddy sites were not affected by the recent Let's Encrypt revocation incident because it manages only single-SAN certificates. And frankly, that shouldn't matter since you don't have to manage them.)

Tomte2 replies#
Ah, TIL.

I was asking because right now my nginx/certbot setup requests a single certificate for all my domains, and I would like to have them separate.
(I'm sure you can do that with certbot, I just haven't tweaked my setup, yet)

mholt#
I see. Yeah, I think CertBot does that because of limitations in Apache (and possibly nginx as well) with "virtual hosting".

So yeah, Caddy uses one name per certificate by default, and there's no way to change that.

purerandomness6 replies#
A certificate can be issued for as many, or as few domains as you'd like.

Look at certbot's -d parameter, this does not have anything to do with nginx, apache, caddy or any other web server.

Continue this thread — 6 replies

buttersbrian1 reply#
and does it currently work with python apps that work via wsgi?
francislavoie1 reply#
There's no wsgi transport built-in, we haven't found any golang libraries that let us do this yet. For now, until we find a solution, we recommend using something like gunicorn and use the `reverse_proxy` directive in Caddy to proxy to it.
nikisweeting1 reply#
I'm no *SGI expert, but ASGI might be easier to bridge with the Golang-style concurrency-model than WSGI. Not sure if there are any libraries for go<->ASGI yet though.

Continue this thread — 2 replies

nikivi5 replies#
At what point does one use Caddy over writing a server with few lines in Go/Node. A bit confused on the use case of Caddy.
hairyhenderson1 reply#
Use Caddy wherever you'd otherwise use Apache HTTPD, nginx, IIS, traefik, Kong, etc...
molszanski#
Why traefik? They both seem to be amazing modern web servers
dubcanada#
It's comparable to Nginx and Apache, not a Go/Node http/https server.
tyingq#
I imagine it's quite a lot more than a few lines of code to correctly handle HEAD requests, ssl/tls, etags, expires headers, and so on.
cthalupa#
I see Caddy as your general use case production web server prior to hitting large scaling needs. I've never gotten it to perform as leanly or scale as well as nginx, but most people will probably not need the headroom nginx provides vs. caddy.

Caddy is significantly easier to manage and get running to a "good enough" stage for people that aren't familiar with nginx and apache, even for most medium sized production deployments.
But, if you've got a team that's comfortable with nginx or apache, and doesn't find themselves spending an undue amount of time fiddling around with managing them, I don't personally believe there's any reason to switch from them to caddy.

Load more comments