2. Reference: https://www.shuijingwanwq.com/2023/07/21/7894/ . The process of switching the domain name of one website to another. The time for this switching is 2023/06/05, and the current time is 2023/12/11 . It was confirmed that it was normal half a year ago.
3. In the Firefox browser, the prompt: Warning: face potential security risks. It is likely that the website’s certificate has expired, thus preventing Firefox from connecting safely. as shown in Figure 2
Figure 2
4. Decide to delete the virtual host, and then add it again. Failed in the verify finished, start to sign. Delete and add successfully. as shown in Figure 3
Figure 3
Do you want to redirect all HTTP requests to HTTPS? [y/n]: y
Please select domain cert key length.
Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert.
Enter one of ec-256, ec-384, ec-521 will issue a ECC cert.
Please enter your cert key length (default 2048):
[Mon Dec 11 05:42:44 PM CST 2023] Using CA: https://acme.zerossl.com/v2/DV90
[Mon Dec 11 05:42:44 PM CST 2023] Single domain='learn-php-app-0605-prod.wangqiang.store'
[Mon Dec 11 05:42:44 PM CST 2023] Getting domain auth token for each domain
[Mon Dec 11 05:43:42 PM CST 2023] Getting webroot for domain='learn-php-app-0605-prod.wangqiang.store'
[Mon Dec 11 05:43:42 PM CST 2023] Verifying: learn-php-app-0605-prod.wangqiang.store
[Mon Dec 11 05:43:44 PM CST 2023] Processing, The CA is processing your order, please just wait. (1/30)
[Mon Dec 11 05:43:48 PM CST 2023] Success
[Mon Dec 11 05:43:48 PM CST 2023] Verify finished, start to sign.
[Mon Dec 11 05:43:48 PM CST 2023] Lets finalize the order.
[Mon Dec 11 05:43:48 PM CST 2023] Le_OrderFinalize='https://acme.zerossl.com/v2/DV90/order/AXuZJZhYYoC-V2rj0fM0pQ/finalize'
[Mon Dec 11 05:44:51 PM CST 2023] Sign failed, finalize code is not 200.
[Mon Dec 11 05:44:51 PM CST 2023] <html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx</center>
</body>
</html>
[Mon Dec 11 05:44:51 PM CST 2023] Please add '--debug' or '--log' to check more details.
[Mon Dec 11 05:44:51 PM CST 2023] See: https://github.com/acmesh-official/acme.sh/wiki/How-to-debug-acme.sh
Do you want to add hotlink protection? [y/n]: y
[root@iZ23wv7v5ggZ ~]# ~/oneinstack/vhost.sh --del
#######################################################################
# OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ #
# For more information please visit https://oneinstack.com #
#######################################################################
Virtualhost list:
learn-php-app-0605-prod.wangqiang.store www.shuijingwanwq.com
Please input a domain you want to delete: learn-php-app-0605-prod.wangqiang.store
Do you want to delete Virtul Host directory? [y/n]: n
Domain: learn-php-app-0605-prod.wangqiang.store has been deleted.
[root@iZ23wv7v5ggZ ~]# ~/oneinstack/vhost.sh
#######################################################################
# OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ #
# For more information please visit https://oneinstack.com #
#######################################################################
What Are You Doing?
1. Use HTTP Only
2. Use your own SSL Certificate and Key
3. Use Let's Encrypt to Create SSL Certificate and Key
q. Exit
Please input the correct option: 3
Please input domain(example: www.example.com): learn-php-app-0605-prod.wangqiang.store
domain=learn-php-app-0605-prod.wangqiang.store
Please input the directory for the domain:learn-php-app-0605-prod.wangqiang.store :
(Default directory: /data/wwwroot/learn-php-app-0605-prod.wangqiang.store): /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com
Create Virtul Host directory......
set permissions of Virtual Host directory......
Do you want to add more domain name? [y/n]: n
Do you want to redirect all HTTP requests to HTTPS? [y/n]: y
Please select domain cert key length.
Enter one of 2048, 3072, 4096, 8192 will issue a RSA cert.
Enter one of ec-256, ec-384, ec-521 will issue a ECC cert.
Please enter your cert key length (default 2048):
[Tue Dec 12 09:45:48 AM CST 2023] Using CA: https://acme.zerossl.com/v2/DV90
[Tue Dec 12 09:45:48 AM CST 2023] Single domain='learn-php-app-0605-prod.wangqiang.store'
[Tue Dec 12 09:45:48 AM CST 2023] Getting domain auth token for each domain
[Tue Dec 12 09:47:19 AM CST 2023] Getting webroot for domain='learn-php-app-0605-prod.wangqiang.store'
[Tue Dec 12 09:47:19 AM CST 2023] Verifying: learn-php-app-0605-prod.wangqiang.store
[Tue Dec 12 09:47:50 AM CST 2023] Processing, The CA is processing your order, please just wait. (1/30)
[Tue Dec 12 09:48:16 AM CST 2023] Success
[Tue Dec 12 09:48:16 AM CST 2023] Verify finished, start to sign.
[Tue Dec 12 09:48:16 AM CST 2023] Lets finalize the order.
[Tue Dec 12 09:48:16 AM CST 2023] Le_OrderFinalize='https://acme.zerossl.com/v2/DV90/order/Vngx1i061GLKvKou91RuTg/finalize'
[Tue Dec 12 09:48:46 AM CST 2023] Order status is processing, lets sleep and retry.
[Tue Dec 12 09:48:46 AM CST 2023] Retry after: 15
[Tue Dec 12 09:49:02 AM CST 2023] Polling order status: https://acme.zerossl.com/v2/DV90/order/Vngx1i061GLKvKou91RuTg
[Tue Dec 12 09:49:32 AM CST 2023] Downloading cert.
[Tue Dec 12 09:49:32 AM CST 2023] Le_LinkCert='https://acme.zerossl.com/v2/DV90/cert/fOxlsHbazT9i7VwqoS2W7g'
[Tue Dec 12 09:50:06 AM CST 2023] Cert success.
-----BEGIN CERTIFICATE-----
xxxxxxxxxx
-----END CERTIFICATE-----
[Tue Dec 12 09:50:06 AM CST 2023] Your cert is in: /root/.acme.sh/learn-php-app-0605-prod.wangqiang.store/learn-php-app-0605-prod.wangqiang.store.cer
[Tue Dec 12 09:50:06 AM CST 2023] Your cert key is in: /root/.acme.sh/learn-php-app-0605-prod.wangqiang.store/learn-php-app-0605-prod.wangqiang.store.key
[Tue Dec 12 09:50:06 AM CST 2023] The intermediate CA cert is in: /root/.acme.sh/learn-php-app-0605-prod.wangqiang.store/ca.cer
[Tue Dec 12 09:50:06 AM CST 2023] And the full chain certs is there: /root/.acme.sh/learn-php-app-0605-prod.wangqiang.store/fullchain.cer
Do you want to add hotlink protection? [y/n]: y
Allow Rewrite rule? [y/n]: y
Please input the rewrite of programme :
wordpress,opencart,magento2,drupal,joomla,codeigniter,laravel
thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud,zblog,whmcs rewrite was exist.
(Default rewrite: other): laravel
You choose rewrite=laravel
Allow Nginx/Tengine/OpenResty access_log? [y/n]: y
You access log file=/data/wwwlogs/learn-php-app-0605-prod.wangqiang.store_nginx.log
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
Reload Nginx......
#######################################################################
# OneinStack for CentOS/RedHat 7+ Debian 9+ and Ubuntu 16+ #
# For more information please visit https://oneinstack.com #
#######################################################################
Your domain: learn-php-app-0605-prod.wangqiang.store
Virtualhost conf: /usr/local/nginx/conf/vhost/learn-php-app-0605-prod.wangqiang.store.conf
Directory of: /data/wwwroot/learn-php-app-0605-prod.shuijingwanwq.com
Rewrite rule: /usr/local/nginx/conf/rewrite/laravel.conf
Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/learn-php-app-0605-prod.wangqiang.store.crt
SSL Private Key: /usr/local/nginx/conf/ssl/learn-php-app-0605-prod.wangqiang.store.key
5. After editing the nginx configuration file as needed, edit the root and restart the nginx service. as shown in Figure 4
Figure 4
[root@iZ23wv7v5ggZ ~]# service nginx restart
Redirecting to /bin/systemctl restart nginx.service
6. Open: https://learn-php-app-0605-prod.wangqiang.store/robots.txt . In Chrome and Firefox browsers are all normal. as shown in Figure 5
Figure 5
7. In-depth study of the root cause, the certificate is made by lets Encrypt is released. lets Encrypt is a global certificate authority (CA) that provides individuals and groups around the world with services to obtain, renew and manage SSL/TLS certificates. Reference: lets Encrypt FAQ. https://letsencrypt.org/en-cn/docs/faq/ . The certificate is valid for 90 days. The reasons behind it can be learned from here. This period cannot be adjusted, and there are no exceptions. We recommend that you automatically renew the certificate every 60 days (after waiting for the next certificate to expire, I hope to find a way to automatically renew, instead of deleting the virtual host, and then adding the virtual host.). as shown in Figure 6
Figure 6
Leave a Reply