Record the stupid solution to the problem that the Oneinstack one-click environment cannot update the Let\\’s Encrypt certificate

888u

Last update at :2024-06-18,Edit by888u

Nowadays, if you need to add an SSL certificate to a website project, it is really convenient. For example, there are many free one-year certificate applications, even if you pay for it, it only costs tens of dollars a year. Or when we use one-click package environments such as LNMP, Oneinstack, and Pagoda Panel, Let\\'s Encrypt free certificates are automatically installed with one click, and automatic renewal is supported by default (because this certificate needs to be renewed after 90 days) can continue to be used).

However, sometimes there are times when the certificate is not automatically renewed. Today, a netizen used the Oneinstack one-click package. The automatically configured Let\\’s Encrypt certificate did not automatically renew the certificate 30 days before expiration. Sometimes Snails have encountered situations where automatic updates do not occur, and they have to manually enter the update script to update and renew.

You can see that there is an error message and it cannot be automatically renewed.

The following certs are not due for renewal yet:/etc/letsencrypt/live/****/fullchain.pem (skipped)No renewals were attempted.

Searching for related solutions, I couldn’t find a suitable solution. Due to limited time, I quickly found a stupid solution.

First, back up the website

Here I directly package the files in the root directory of the website, and then drag them to local and other sites and servers for backup. If you are worried about data and system problems, we can also back up the database.

Second, clean up existing certificate files

/etc/letsencrypt

Go to this directory and manually delete all the site folders in several directories.

Third, delete the site

./vhost.sh del

Here we use the Oneinstack one-click package. We can delete the site including the directory. Because we have backed it up (you have to make sure it is backed up), it can be deleted.

Fourth, re-create the site

./vhost.sh

Re-create the site, of course you need to choose to automatically install the Let\\’s Encrypt certificate.

Fifth, migration data recovery

We will migrate the backed up data to the added site directory. Since I have not touched the database, I can open it normally after decompressing the migration compressed package and adjusting the directory, and I can see that the certificates are all up to date.

This problem is solved in a stupid way. The author has consulted the oneinstack script author and mentioned that it should be caused by a problem with the server connection certificate, or he has modified the nginx configuration script. If he encounters it again in the future, he will see if there is a good way, so it is easier to manually migrate and add data every time. trouble.

Recommended site searches: Tencent cloud server, foreign free universal space, shopex virtual host, free personal cloud server outside mainland China, free space application, domain name registration information query, foreign space rental, space service provider, free cloud host, overseas Host rental,

Record the stupid solution to the problem that the Oneinstack one-click environment cannot update the Let\\’s Encrypt certificate

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码