時(shí)間:2022-08-22 20:24:01 | 來源:網(wǎng)站運(yùn)營
時(shí)間:2022-08-22 20:24:01 來源:網(wǎng)站運(yùn)營
原文:免費(fèi) Https 證書(Let's Encrypt)申請與配置$ git clone https://github.com/certbot/certbot$ cd certbot$ ./certbot-auto --help
解壓打開執(zhí)行就會有相關(guān)提示./certbot-auto certonly --webroot --agree-tos -v -t --email 郵箱地址 -w 網(wǎng)站根目錄 -d 網(wǎng)站域名./certbot-auto certonly --webroot --agree-tos -v -t --email keeliizhou@gmail.com -w /path/to/your/web/root -d note.crazy4code.com
注意這里 默認(rèn)會自動生成 /網(wǎng)站根目錄/.well-known/acme-challenge,然后 shell 腳本會對應(yīng)的訪問 網(wǎng)站域名/.well-known/acme-challenge- Congratulations! Your certificate and chain have been saved at/etc/letsencrypt/live/網(wǎng)站域名/fullchain.pem...
openssl dhparam -out /etc/ssl/certs/dhparams.pem 2048
listen 443ssl on;ssl_certificate /etc/letsencrypt/live/網(wǎng)站域名/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/網(wǎng)站域名/privkey.pem;ssl_dhparam /etc/ssl/certs/dhparams.pem;ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;ssl_ciphers HIGH:!aNULL:!MD5;
然后重啟 nginx 服務(wù)就可以了server { listen 80; server_name your.domain.com; return 301 https://$server_name$request_uri;}
客戶&案例
關(guān)于我們
微信公眾號
版權(quán)所有? 億企邦 1997-2022 保留一切法律許可權(quán)利。