We use letsencrypt (certbot) with the CloudFlare DNS plugin to generate a fee, auto-renewing TLS certificate to use with Nginx.
Then we configure Nginx to use that TLS certificate and create a configuration to support multi-tenancy in our applications.
We use a special configuration to capture the value of the subdomain so we can pass it off to our PHP application (or do anything we want, like use dynamic app locations for local development - as described here: • Local dev setup for multi-tenant applications ).
► Useful Links:
Install certbot: certbot.eff.org/
Certbot challenge types: letsencrypt.org/docs/challenge-types/
My site: fideloper.com
My newsletter: fideloper.ck.page/
⌚️ Timestamps
00:00 What we'll do
00:35 Certbot + Cloudflare setup
01:28 Cloudflare API Credentials
02:02 Generating the wildcard certificate
03:47 OK Nginx Config
06:05 Better Nginx Config
08:17 Another Trick
コメント