[Solved] Question about Lets Encrypt cert for 1st site of a Multitenant Server

This is what I did:

What I was not sure about, was how to treat the first site. Do I use the Lets Encrypt command through bench to apply it to “site1.local” or “my.sitename.com

Or, is there a better way to do this? Like maybe should I have actually altered the name of “site1.local” in the /sites/ directory to be a full domain name instead and then go about the Lets Encrypt process on a real domain name?

I am just not sure how this works and I don’t really want to experiment and have to tear everything down and start from scratch with a blank server again. I know that the certificates are based on a URL (or at least I think thats the case) and “site1.local” is not really a URL. But then again “my.sitename.com” is not really the name of the site in the /sites/ directory so if I use it in the Lets Encrypt / bench process, will it work or will it just make a mess of everything?

Does anyone here have experience with this?

I have all my other tenant sites secured, I am just not sure how to proceed with the first site.


Well, I eventually figured this out.

What was not plain to see at first, there is actually a special name for the condition of the 1st site of a multitenant server. Once this command has run…

“bench setup add-domain --site site1.local [my.sitename.com]”

The site1.local is considered to have a “Custom Domain”
I only stumbled across this by accident while trying to find answers.

There is also a special way to handle the Lets Encrypt certificates for sites with “Custom Domain” names. Since site1.local is the default we will use that in the example here. The new command syntax is:

sudo –H bench setup lets-encrypt site1.local –custom-domain [sitename]

Everything else about handling the security changes remains the same.

So… Thank you to anyone that at least looked in here to try to help, but after a few more hours I finally found an answer. I will make this one solved.


1 Like