|
发表于 2020-4-12 01:58:25
|
显示全部楼层
本帖最后由 dukelec 于 2020-4-12 02:01 编辑
這是首次申請證書的命令,如果日後想增加,只要重新執行一下這條命令添加更多域名就可以,如果僅僅續約,只要執行 certbot renew 就可以了。
(certbot 是 letsencrypt 的配套軟件,可以官網下載,也可以用 linux 的包管理器安裝)
certbot 軟件會在本服務器啓動 https 的端口,並讓 letsencrypt 發數據到你申請的域名,如果能正確通信,就表示你擁有這些域名,就可以成功申請證書。
(所以執行命令的時候要關掉佔用 https 的程序,譬如 Apache)
用 certbot 申請證書比在網頁上點來點去方便多了,還能寫腳本自動化續約。
win10 的話不是可以跑 linux 程序嗎?你也可以試試,實在不行可以在虛擬機中操作,網卡橋接一下。
- dukelec ~ # certbot certonly --standalone -d dukelec.com -d www.dukelec.com -d d-l.io -d www.d-l.io -d blog.dukelec.com -d blog.d-l.io -d p.d-l.io -d e.d-l.io
- Saving debug log to /var/log/letsencrypt/letsencrypt.log
- Plugins selected: Authenticator standalone, Installer None
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- You have an existing certificate that contains a portion of the domains you
- requested (ref: /etc/letsencrypt/renewal/dukelec.com.conf)
- It contains these names: dukelec.com, blog.d-l.io, blog.dukelec.com, d-l.io,
- p.d-l.io, www.d-l.io, www.dukelec.com
- You requested these names for the new certificate: dukelec.com, www.dukelec.com,
- d-l.io, www.d-l.io, blog.dukelec.com, blog.d-l.io, p.d-l.io, e.d-l.io.
- Do you want to expand and replace this existing certificate with the new
- certificate?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- (E)xpand/(C)ancel: E
- Renewing an existing certificate
- Performing the following challenges:
- http-01 challenge for e.d-l.io
- Waiting for verification...
- Cleaning up challenges
- IMPORTANT NOTES:
- - Congratulations! Your certificate and chain have been saved at:
- /etc/letsencrypt/live/dukelec.com/fullchain.pem
- Your key file has been saved at:
- /etc/letsencrypt/live/dukelec.com/privkey.pem
- Your cert will expire on 2020-01-31. To obtain a new or tweaked
- version of this certificate in the future, simply run certbot
- again. To non-interactively renew *all* of your certificates, run
- "certbot renew"
- - If you like Certbot, please consider supporting our work by:
- Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
- Donating to EFF: https://eff.org/donate-le
复制代码 |
|