JKA
JKA

Reputation: 21

Nginx / Laravel multi tenancy SSL management

Working with a multi tenancy solution where users are to be allowed to set their custom domains - the solution works just fine. However, looking for suggestions on how to get the SSL installed on those custom domains and set them in Nginx so they are served via https route.

In theory, as soon as the user adds custom domain from the backend - SSL is to be installed once A record / CNAME is verified to be pointing correctly. We will be getting Letsencrypt SSL and need an approach on how to handle Ngnix config to provide SSL key to it can be served.

If anyone has produced a similar solution and can shed light on how to approach this, that will be great.

Thanks in advance.

Upvotes: 0

Views: 493

Answers (1)

Daniel Spravtsev
Daniel Spravtsev

Reputation: 21

You can solve it by manually issuing certificates using Let's Encrypt and then adding new NGINX config file for serving new domain

Or you can just switch from NGINX to Caddy and it will automatically do it for you! Also you could specify in your application route file a route for a domain whitelist check to prevent unauthenticated domain issues

Upvotes: 2

Related Questions