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 5 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 5 years ago.

Trending on Indie Hackers
Why Most Startup Product Descriptions Fail (And How to Fix Yours) User Avatar 99 comments We just hit our first 35 users in week one of our beta User Avatar 44 comments From Ideas to a Content Factory: The Rise of SuperMaker AI User Avatar 27 comments AIgenerationtool — replacing hiring writers with 1 AI dashboard User Avatar 25 comments Why Early-Stage Founders Should Consider Skipping Prior Art Searches for Their Patent Applications User Avatar 20 comments NanoBanana or Seedream4.0? Why Choose When You Can Have Both User Avatar 20 comments