Is there a config I can utilize on mac to generate and map SSL certs for local domains? Regardless of using a subdomain.mysite.local or other mysite2.local, mysite3.local etc. only the main domain ever has a trusted SSL. Is there a way to trust additional domains even if it’s a manual process?
I thought that maybe syncing the domains with the hosts file would “fix” it but it didn’t seem to make any adjustments
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:
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.
Thanks @ben.turner I’ll give it a shot!
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.