How to configure HTTPS, for two subdomains

Here in this article its adds “ssl_certificate”: “/etc/letsencrypt/live/erpnext.cert” , and “ssl_certificate_key”: “/etc/letsencrypt/live/erpnext.key” to site_config.json

Adding Custom Domains to your Site

While…here in this article its suggested to add below two lines.

Configure the certificates for your site(s)

I have two sites and i want them to be served on and

  1. multitenancy ON
  2. SSL certificate downloaded

Appriciate if anyone could help.

You need to get a wildcard certificate for your domain so that you can serve *
This can be done via the free letsencrypt system using a DNS)! challenge instead of an http01 challenge.

The alternative would be to set up the certificate for 2 domains

certbot .....
 ... the rest of your parameters

Hi @falahtech

I agree with @trentmu to get a cert for the * ( wildcard)

Here is a nice site

This is what I did ( NB NOTE : this is the manual process !!! )

Install certbot
sudo certbot certonly --manual --preferred-challenges dns
( use * … … when asked )

Then you create a DNS record ( TXT ) with the acme code
Add wildcard section to your comon_site_config.json file
bench setup nginx
sudo service nginx reload

That should do it.