I have just created CyberPanel and start moving my websites from my old cPanel host (also Litespeed server). However, my domains keeps getting self-signed SSL certificates. I have tried troubleshooting using this guide, but that does not solve my problem: https://community.cyberpanel.net/t/how-to-fix-ssl-issues-in-cyberpanel/90
When I visit my domain https://www.apha.dk I get a NET::ERR_CERT_AUTHORITY_INVALID error. In the browser I can see that the certificate was given by “Dis” and in CyberPanel it says “Apha.dk has self-signed SSL”. When I go to the folder /etc/letsencrypt/live/apha.dk I can see that there is a fullchain.pem and privkey.pem file with a code inside.
My CyberPanel logfile says the following:
[12.08.2022_07-31-52] [Errno 2] No such file or directory: '/etc/letsencrypt/live/apha.dk/fullchain.pem'
[12.08.2022_07-38-28] Status Code: 200 for: http://www.apha.dk/.well-known/acme-challenge/apha.dk
[12.08.2022_07-38-28] Status Code: 200 for: http://apha.dk/.well-known/acme-challenge/apha.dk
[12.08.2022_07-38-30] /root/.acme.sh/acme.sh --issue -d apha.dk -d www.apha.dk --cert-file /etc/letsencrypt/live/apha.dk/cert.pem --key-file /etc/letsencrypt/live/apha.dk/privkey.pem --fullchain-file /etc/letsencrypt/live/apha.dk/fullchain.pem -w /usr/local/lsws/Example/html -k ec-256 --force --server letsencrypt
[12.08.2022_07-38-33] Failed to obtain SSL for: apha.dk and: www.apha.dk
[12.08.2022_07-38-33] Trying to obtain SSL for: apha.dk
[12.08.2022_07-38-34] Failed to obtain SSL, issuing self-signed SSL for: apha.dk
[12.08.2022_07-38-35] Self signed SSL issued for apha.dk.
I have Cyberpanel 2.3 build 2 installed.
Any ideas how to make CyberPanel use the Lets Encrypt certificate instead?
sh <(curl https://raw.githubusercontent.com/josephgodwinkimani/cyberpanel-mods/main/selfsigned_fixer.sh || wget -O - https://raw.githubusercontent.com/josephgodwinkimani/cyberpanel-mods/main/selfsigned_fixer.sh)
See wiki after skipping those parts and proceed to this part:
Then Go back to OLS and add the privatekey /etc/letsencrypt/live/mydomain.com/privkey.pem and fullchain /etc/letsencrypt/live/mydomain.com/fullchain.pem links to the vHost of the domain
Hi, thank you for your help However, it still didn’t work
In the OLS WebAdmin Console the Private key file and Certificate file is set to correct Lets Encrypt destinations. I runned your tool, but it didn’t change anything. I still have the selfsigned SSL certificate on apha.dk
Arh missed that. I have done that now. Now Lets Encrypt is named on the certificate when I visit the website, but I still get a warning. If I look on the certificate, it doesn’t say the URL apha.dk, but instead the URL of my CyberPanel. It is also the date from yesterday when I added the domain, even though I have tried to
I have also tried from point 1-4. How do I do point 5, deleting the certificates? Is this just deleting the two .pem files?
I have checked your domain its perfect except for mismatch.
Go to OLS WebAdmin COnsole under Virtual Hosts choose apha.dk confirm you have the correct paths for /etc/letsencrypt/live/apha.dk/privkey.pem and fullchain /etc/letsencrypt/live/apha.dk/fullchain.pem
The Common name: should be apha.dk and SANs: apha.dk, www.apha.dk in chained certificate
NOT Common name: panel.ansico.dk and SANs: panel.ansico.dk
Post screenshot of your terminal after above command
Go back to OLS and add the privatekey /etc/letsencrypt/live/apha.dk/privkey.pem and fullchain /etc/letsencrypt/live/apha.dk/fullchain.pem links to the vHost of the domain
What are rDNS PTR records used for? Isn’t that only for secure mail, because I use Sendgrid af mailrelay, so they should handle that part.
Yes I have a hostname certificate on the subdomain that I use to access the panel.
Unfortunately I can see that I have now tried to renew the Lets Encrypt certificate 5 times, and unfortunately deleted the old ones, so I guess I have to wait a week before I try again
Just a follow up on this, since I have now found a solution that works for me. I first created a free ZeroSSL certificate on zerossl.com. The content of the files certificate, ca_bundle and private I pasted in the fields at Add SSL in CyberPanel. The ZeroSSL certificate was installed instead. After that I go back to CyberPanel and issued a new Lets Encrypt certificate, and this time it was installed perfectly and overwrite the ZeroSSL certificate.