9
2 Comments

Generating SSL certs on-demand with caddy server

We at helpninja used Nginx as a reverse proxy to our backend.
During the development of Documentation feature, our requirements changed a bit. We allowed users to serve the docs on their custom domain, However, the challenge was to serving those domains over HTTPS. We started looking for a web server that generates SSL certs on demand and maintains them. Finally, we managed to get a working prototype with Openresty + Lua (lua-resty-auto-ssl) Plugin.
It all worked well, after having more than 50 custom domains we started facing issues with this setup. Resulted in performance degradation and sometimes Openresty gets crashed. So we started searching for alternatives and found caddy. Caddy offered lots of things out of the box.
Like ...

  • Automatic HTTPS generation
  • On-demand TLS with a little config
  • Simple and readable configuration

Here is our CaddyFile:

posted to Icon for group Developers
Developers
on November 4, 2019
  1. 1

    This is exactly what I am looking for. I am trying to figure it out from past few months and asking for help everywhere. I would really appreciate if you would help me!
    I am using PHP, Apache server to server my web app with MySQL, can you please help me figuring out how do allow https on custom domain and configure caddy?
    Appreciate it brother!!!

  2. 1

    This comment was deleted 6 years ago.

    1. 2

      We are creating a cname records when the user created a new doc site. User needs to add our cname records in their dns. Our caddy server receives the incoming requests and forward to node server. Node server will identify the site and serve the corresponding page.

      1. 2

        This comment was deleted 6 years ago.

Trending on Indie Hackers
I've been building for months and made $0. Here's the honest psychological reason — and it's not what I expected. User Avatar 170 comments This system tells you what’s working in your startup — every week User Avatar 52 comments 11 Weeks Ago I Had 0 Users. Now VIDI Has Reviewed $10M+ in Contracts - and I’m Opening a Small SAFE Round User Avatar 46 comments 7 years in agency, 200+ B2B campaigns, now building Outbound Glow User Avatar 17 comments Show IH: WeProcess. Integrated platform or another all-in-one stretched too thin? User Avatar 9 comments Most teams think they have a detection problem. They don't. User Avatar 8 comments