CyberHosting

[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

https://i.imgur.com/x1kaUbm.png


2. 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.


3. 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.

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

as screenshot, for enterprise

https://i.imgur.com/TMjRtsy.png

for openlitespeed

https://i.imgur.com/dddneJm.png

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.
Sign In or Register to comment.
CyberPanel Discord

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!