Generate SSL for multiple local domains within a multisite (domain or subdomain)

I’ve never tried doing this, so I’m not 100% sure it will work.

First thing, the “Sync domains” button in Local is mostly just writing the domains that are set within the WP site with the Hosts file. This process doesn’t do anything with the SSL certificate for the site.

I’ve never manually created certificates, but maybe you can do something with openssl on the command line?

When Local creates certificates for a site (ie, when you click the “Trust” button) those are all saved within the configuration folder of the Local Router. On a mac, that location is here:

~/Library/Application Support/Local/run/router/nginx/certs

I can “see” the contents of those .crt files with this command:

openssl x509 -text -noout -in sitename.local.crt

Again I’m not familiar enough with all the nuances of the openssl program, but maybe you can add domains that way? Off the top of my head, you might also need to somehow edit and reload the Local Router’s nginx config so that it has the correct server blocks to respond to those add-on domains.