[Tutorial] How to apply wildcard cert for multiple sites.

there are several ways to apply a cert for a site

  1. go to website page , click “add SSL” as screenshot , then place your cert and key there

  1. you can also issue a self-signed cert first via panel , and then override its cert to the wild card.

e.g. by default all the cert are saved in

/etc/letsencrypt/live/domain.com/fullchain.pem
/etc/letsencrypt/live/domain.com/privkey.pem

so you can also directly editing all those files to apply new cert.

  1. but , if you have a lot of sites , manually edit them every 3 months is very annoying , so you can use soft link way.

save your wildcard cert in one location, for example

/etc/letsnecrypt/wildcard.crt
/etc/letsencrypt/wildcard.key

now , remove these files

/etc/letsencrypt/live/domain.com/fullchain.pem
/etc/letsencrypt/live/domain.com/privkey.pem

and then use ln -s command to link them

ln -s /etc/letsnecrypt/wildcard.crt /etc/letsencrypt/live/domain.com/fullchain.pem

ln -s /etc/letsencrypt/wildcard.key /etc/letsencrypt/live/domain.com/privkey.pem

so this way , the linked file will update when you update the source file , so you don’t need to change them again.

  1. you can also directly modify the vhost conf file to your wildcard cert/key

as screenshot, for enterprise

for openlitespeed

change the red-marked text to , as example above , to

/etc/letsnecrypt/wildcard.crt
/etc/letsencrypt/wildcard.key

would also work.

please do remember restart OpenLiteSpeed or LiteSpeed enterprise after you apply the change.

I using this tutorial and get error after symblink.