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
Stop Spamming Reddit for MRR. It’s Killing Your Brand (You need Claude Code for BuildInPublic instead) User Avatar 201 comments What happened after my AI contract tool post got 70+ comments User Avatar 170 comments Where is your revenue quietly disappearing? User Avatar 64 comments The workflow test for finding strong AI ideas User Avatar 45 comments The Quiet Positioning Trick Small Products Use to Beat Bigger Ones User Avatar 40 comments a16z says "these startups don't exist yet - it's your time to build." I've been building one. User Avatar 34 comments