Let’s Encrypt

重新生成證書

  1. docker restart my-app

  2. 啟動系統nginx 80 端口

sudo lsof -i :80

sudo pkill nginx

  1. 設置nginx

    复制代码
     listen 80;
     listen [::]:80;
    
     server_name erp.my.com;
    
     location /.well-known/acme-challenge/ {
         root /var/www/html;
         allow all;
     }

4.啟動 nginx 80

sudo systemctl start nginx

  1. 申請新證書

sudo certbot renew

复制代码
Congratulations, all renewals succeeded:
  /etc/letsencrypt/live/erp.my.com/fullchain.pem (success)
  1. 授權

    cp privkey.pem fullchain.pem cert.pem chain.pem /opt/workspace/myapp/ssl2

  2. 重新啟動 app

檢查證書

1. 檢查期限

复制代码
sudo certbot certificates

2. 重新生成

sudo certbot renew --dry-run

附件

/etc/nginx/sites-available 下面配置 default

复制代码
server {

    listen 80;
    listen [::]:80;

    server_name weberp.eilhk.com;

    location /.well-known/acme-challenge/ {
        root /var/www/html;
        allow all;
    }

    location / {
        root /var/www/html;
        index index.html index.htm;
    }
	server_name _;
}

生成证书在/etc/letsencrypt/live/app.mywebsite.com

相关推荐
2501_915909062 天前
怎么用 FlutterFlow 把应用发布到 App Store?
android·ios·小程序·https·uni-app·iphone·webview
2501_916008893 天前
全平台抓包工具,Windows、iPhone、Linux三个平台抓包测试
网络协议·计算机网络·网络安全·ios·adb·https·udp
szephyr3 天前
Nginx 反向代理实战:从 502、跨域到 HTTPS,一次打通
运维·nginx·https·部署·反向代理
2501_915918413 天前
怎么把 Python 写的 Flet 应用打包成 iOS App 并上架 App Store?
android·ios·小程序·https·uni-app·iphone·webview
Anthony_2313 天前
Nginx基础
服务器·nginx·http·https·edge浏览器·web
天天喝旺仔3 天前
深入理解 JWT:从 Token 结构、签名机制到前后端鉴权实战
redis·安全·spring·微服务·https
Lsetea4 天前
CDN换了SSL证书仍显示旧证书?按边缘节点、SNI和缓存逐层排查
https·cdn·ssl证书·openssl·tls
00后程序员张4 天前
怎么用 Egret(白鹭引擎)打包 iOS 应用并上架 App Store?
android·ios·小程序·https·uni-app·iphone·webview
Lsetea5 天前
Java 请求 HTTPS 报 PKIX path building failed:从证书链到 truststore 的完整排查
java·https·ssl证书·keytool·truststore
Lhappy嘻嘻5 天前
网络(六)|应用层 HTTP&HTTPS:URL、请求响应、Cookie 与证书
网络·http·https