»
001. Free HTTPS Certificate
This article refers to a large number of articles on websites such as CSDN.
GoDaddy is a free SSL certificate update website that provides free certificate applications. Let's Encrypt, Buypas, ZeroSSL, and SSL.com are free certificate registration websites.
The detailed technical content related to certificates will be skipped here. What we are going to talk about here is how to save personal certificate application fees ranging from five to six hundreds to over a thousand yuan per year. Without further ado, here are the steps:
(1) Register a free developer account at development.godaddy.com
(2) Apply for an API Key on development.godaddy.com and select the environment as Production
(3) Install acme.sh on your Linux server ( https://gitee.com/neilpang/acme.sh )
curl https://get.acme.sh | sh
...
Install success!
(4) Upgrade Script
acme.sh --upgrade
(5) Enable automatic updates for configuration scripts:
acme.sh --upgrade --auto-upgrade
The script to disable automatic updates is:
acme.sh --upgrade --auto-upgrade 0
(6) Switch certificate registration website:
Switch to Let's Encrypt (recommended)
acme.sh --set-default-ca --server letsencrypt
Switch Buypass
acme.sh --set-default-ca --server buypass
Switch ZeroSSL
acme.sh --set-default-ca --server zerossl
Switch SSL.com
acme.sh --set-default-ca --server ssl.com
(7) Set the Key and Secret applied for on development.godaddy.com to the environment variables. This setting only needs to be set once before calling acme.sh, and the script will automatically save the settings after running acme.sh.
Paste and execute the API Key and Secret created on development.godaddy.com:
export GD_Key="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
export GD_Secret="xxxxxxxxxxxxxxxxxxxxxxxxxxx"
(8) Call: acme.sh -- issue - d v-signon. com -- webroot/root/vso-www/
This method acme.sh will allow GoDaddy servers to verify if your domain name can be accessed. That is to say, the script will place a file in the root directory of your website and then have the server verify whether your domain name can be accessed. If you can access it, GoDaddy will assume that this domain corresponds to your GoDaddy account. After running the script, the certificate file will be automatically downloaded:
[Fri Jun 28 12:11:53 CST 2024] Your cert is in: /root/myacme/ssl/v-signon.com_ecc/v-signon.com.cer
[Fri Jun 28 12:11:53 CST 2024] Your cert key is in: /root/myacme/ssl/v-signon.com_ecc/v-signon.com.key
[Fri Jun 28 12:11:53 CST 2024] The intermediate CA cert is in: /root/myacme/ssl/v-signon.com_ecc/ca.cer
[Fri Jun 28 12:11:53 CST 2024] And the full chain certs is there: /root/myacme/ssl/v-signon.com_ecc/fullchain.cer
(9) Configure the SSL service in your nginx, and be sure to follow the SSL keyword after port 443.
listen 443 ssl;
listen [::]:443 ssl;
server_name v-signon.com;
ssl_certificate /root/myacme/ssl/v-signon.com_ecc/v-signon.com.cer;
ssl_certificate_key /root/myacme/ssl/v-signon.com_ecc/v-signon.com.key;
(10) Create a new 777 script/root/do-acme.sh with the following content:
#!/ bin/bash
alias acme.sh=/root/myacme/acme.sh
acme.sh --renew-all --force --reloadcmd "/usr/sbin/nginx -s reload"
(11) Activate Linux's crond timer service and remove the default acme code, adding the following code:
0 0 28 */3 * /root/do-acme.sh
Note: After deploying the free SSL certificate for Let's Encrypt, it only support secure access for desktop browsers. Some mobile phones and WeChat are not friendly to the free SSL certificate support for Let's Encrypt.
---- www.v-signon.com Learninger Co-Encourage