SSL For Free 申请免费https SSL 凭证
打開 SSL For Free網(wǎng)站(https://www.sslforfree.com) ,在輸入框中填入你要申請 Let’s Encrypt 憑證的網(wǎng)域名稱,可以用空白來分隔不同的網(wǎng)址,例如[subdomain.domain.com domain.com other.com](這個沒試過),輸入后點選右邊的[Create Free SSL Certificate]繼續(xù)。?
二、
提供了三種驗證網(wǎng)站的方式,此處選擇使用手動的驗證方式,即[Manually Verification]:點選下方的[Manually Verify Domain]繼續(xù)。?
三、
按照手工驗證的步驟說明[Upload Verification Files]依次操作,?
1.點擊 第 步驟1 中的 Download File #1 鏈接下載驗證文件?
2.上傳驗證文件到服務(wù)器,確認步驟5中的鏈接能正常訪問后,點擊?
[Download SSL Certificate]。?
四、?
如果通過驗證后,就會開始為生成所申請網(wǎng)站 SSL 憑證。當憑證生成后,可以看到[Get Notified of Expiration],由于申請的憑證有效期只有90天,所以可以在此設(shè)定一組 Email 和密碼,即可在憑證過期前(一周左右)取得通知,以免錯過延長(renew)時間。?
點擊[Download All SSL Certificate Files]下載憑證文件壓縮包,解壓縮后可以看到private.key、ca_bundle.crt 和 certificate.crt 三個文件!?
五、修改域名配置(以nginx為例)
- http跳轉(zhuǎn)到https配置
server {?
listen 80;?
server_name my.domain.com;?
index index.html;?
return 301?https://servernamerequest_uri;?
}server {?
listen 443 ssl;?
server_name my.domain.com;?
index index.html;?
access_log logs/access_my_domain_com.log;?
ssl_certificate /etc/ssl/my_domain_com/certificatet.crt;#對應(yīng)壓縮包里的certificatet.crt?
ssl_certificate_key /etc/ssl/my_domain_com/private.key;#對應(yīng)壓縮包里的private.key?
location / {?
root /opt/vhosts/my_domian_com;?
}?
}
- http,https同時可以訪問配置
server {?
listen 80;?
listen 443 ssl;?
server_name my.domain.com;?
index index.html;?
ssl_certificate /etc/ssl/my_domain_com/certificatet.crt;#對應(yīng)壓縮包里的certificatet.crt?
ssl_certificate_key /etc/ssl/my_domain_com/private.key;#對應(yīng)壓縮包里的private.key?
access_log logs/access_my_domain_com.log;?
location / {?
root /opt/vhosts/my_domian_com;?
}?
}
- 驗證修改后的配置文件是否正確
$ ./nginx -t -c /usr/local/nginx/conf/nginx.conf?
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok#驗證通過?
./nginx -s reload #重新加載nginx配置
轉(zhuǎn)載于:https://www.cnblogs.com/aaronguo/p/8280679.html
總結(jié)
以上是生活随笔為你收集整理的SSL For Free 申请免费https SSL 凭证的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 浙江大学数学专业考研试题参考解答
- 下一篇: 五 Android Studio打包Ee