1. 程式人生 > >Using LetsEncrypt & Certbot to create SSL certificates

Using LetsEncrypt & Certbot to create SSL certificates

RT

Certbot

到下面的網站,一下指令碼,可以助力你快速申請證書

下面以centos 6 - nginx 為例:

選好系統版本,即下面的URL

1、下載

wget -O /sbin/certbot https://dl.eff.org/certbot-auto
chmod a+x /sbin/certbot
2、修改nginx主機配置檔案(vhost則配置在vhos配置檔案上)配置在第一個location匹配規則上

location ^~ /.well-known/acme-challenge/ {
  default_type “text/plain”;
  root /path/website/;
}

location = /.well-known/acme-challenge/ {
  return 404;
}

重新載入生效:server nginx reload

3、申請證書

 certbot certonly --email [email protected] --agree-tos --no-eff-email --webroot -w /path/website -d www.example.com

  申請的證書一般都會在/etc/letsencrypt/live/example.com/ 下,會有下面5個檔案 #注意example為你的網站名

  cert.pem chain.pem fullchain.pem privkey.pem README

4、為NGINX新增SSL

我的nginx 為原始碼安裝/usr/local/nginx下

 建立sslkey儲存目錄

  [[email protected] sslkey]#mkdir -pv /usr/local/nginx/conf/sslkey

  [[email protected] sslkey]#cd /usr/local/nginx/conf/sslkey

  [[email protected] sslkey]#ln -s /etc/letsencrypt/live/example.com/* ./
  [

[email protected] sslkey]# ls
  cert.pem chain.pem fullchain.pem privkey.pem README
  [[email protected] sslkey]# pwd
  /usr/local/nginx/conf/sslkey
  [[email protected] sslkey]#

5、修改nginx主機配置檔案(vhost則配置在vhos配置檔案上)新增ssl支援,例如下面的

  listen 80;
  listen 443 ssl;
  server_name www.example.com;

  root /path/website/;
  index index.php index.htm index.html;

  ssl on;
  ssl_certificate /usr/local/nginx/conf/sslkey/cert.pem;
  ssl_certificate_key /usr/local/nginx/conf/sslkey/privkey.pem;
  ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  ssl_ciphers ALL:!DH:!EXPORT:!RC4:+HICH:+MEDIUM:!LOW:!aNULL:!eNULL;

    ……

  重啟生效

  訪問HTTPS沒毛病

6、由於只有90天就得更新證書,而且只有在7天內的過期的才能更新,所以得把證書更新新增到計劃任務,時間根據需要設定

  #crontab -e 

  00 00 00 */3 * /sbin/certbot renew --renew-hook "service nginx reload" --quiet > /dev/null 2>&1 &

7、回收證書

  certbot revoke --cert-path /etc/letsencrypt/live/example.com/cert.pem

  certbot delete --cert-name example.com

8、 cerbot擴充套件,可以扮發多路徑多域名證書,多路徑單域名暫時沒有看到,你看得到話留言吧

  執行

#certbot -h all

Letsencrypt

相關推薦

Using LetsEncrypt & Certbot to create SSL certificates

RT Certbot 到下面的網站,一下指令碼,可以助力你快速申請證書 下面以centos 6 - nginx 為例: 選好系統版本,即下面的URL 1、下載 wget -O /sbin/certbot https://dl.eff.or

Using LetsEncrypt & Certbot to create SSL certificates

RT Certbot 到下面的網站,一下指令碼,可以助力你快速申請證書 https://certbot.eff.org/ 下面以centos 6 - nginx 為例: 開啟https://certbot.eff.org/ 選好系統版本,即下面的URL htt

python多版本配置後使用pip出現 Fatal error in launcher: Unable to create process using '"'

com num cnblogs src eat sta reat xxxxx 。。 上一篇剛介紹了python的多版本環境配置,然後再我把python2的python.exe改成python2.exe之後,python2的pip就不好使了,出現了如題的錯誤。。。 然後解決辦

pip安裝出現Fatal error in launcher: Unable to create process using '"'的解決辦法

python2 情況 是否 bubuko inf img where class 控制 python中使用pip安裝模塊時,出現:Fatal error in launcher: Unable to create process using ‘"‘ 原因:系統中可能有多處安

python2.7升級到python3後,用pip進行安裝時報Fatal error in launcher:Unbale to create process using`""

com AR net tar 完成 ng- htm o-c www 解決:python2.7升級到python3後,用pip進行安裝時報Fatal error in launcher:Unbale to create process using`"" 通過查資料查到:htt

pip3 Fatal error in launcher: Unable to create process using '"' [轉]

using 不讓 In ces 更改 都是 情況下 安裝 關聯 在新環境上安裝python的時候又再次遇到了這個情況,這次留意了一下,發現原來的文章有錯誤的地方,所以來更新一下,應該能解決大部分的問題。 環境是win8,原來只安裝了python2.7。後來因為要用到py

解決Fatal error in launcher: Unable to create process using '"'

最新版 create mage 技術分享 創建 unable python .com eat 問題 分析原因 網上看了很多方案都說直接運行 python3 -m pip install --upgrade pip 來升級pip版本就好了,這個在大多數情況下都是有用的。因為

SAMPLE SCRIPT TO CREATE SALES ORDER USING OE ORDER PUB PROCE

分享一下我老師大神的人工智慧教程!零基礎,通俗易懂!http://blog.csdn.net/jiangjunshow 也歡迎大家轉載本篇文章。分享知識,造福人民,實現我們中華民族偉大復興!        

用IAR開啟STM8時,出現“Unable to create configuration 'Debug' using tool chain ‘STM8’

用IAR開啟STM8時,出現“Unable to create configuration 'Debug' using tool chain ‘STM8’,   出現這個問題的原因是按裝的IAR不正確,要裝ST for STM8版本的,而不能用ST for ARM版本的

Fatal error in launcher: Unable to create process using '"' PermissionError: [WinError 5] 拒絕訪問。:

Fatal error in launcher: Unable to create process using ' python 安裝gevent報這個錯誤 使用 python -m pip install gevent   若下載成功但又出現 Permissio

Python:Fatal error in launcher: Unable to create process using 問題排查

cmd> django-admin 回車Fatal error in launcher: Unable to create process using '"c:\users\administrator\appdata\local\programs\python\python37\python.exe"

啟動jupyter notebook時,報錯“Fatal error in launcher: Unable to create process using '"'”

問題描述:      電腦上同時安裝了python2 和python3並且把裡面的python.exe分別改成了python2.exe和python3.exe,在python3下安裝完Jupyter,輸入jupyter notebook時提示Fatal error in l

virtualenv使用報錯:Fatal error in launcher: Unable to create process using '"'

python virtualenv使用報錯:Fatal error in launcher: Unable to create process using '"' 在一個系統中共存Python2、python3的時候,virtualenv使用的時候會報錯:

解決"pip Fatal error in launcher: Unable to create process using ... "的錯誤

前言 我的本機上已經有了python的環境了,也裝了pycharm編輯器(IDE)。 當時我python2和3版本都裝了的,但是現在我忘記了。 所以我需要重新熟悉一下,並且安裝anaconda這個IDE。 摘要 本來是想先熟悉一下開發環境,結果發現並解決了一個問

Python中pip安裝報錯Unable to create process using '....'

因為我本人在電腦上安裝了python2和python3,所以在安裝的時候,把兩個python的安裝目錄都安裝到G盤了。然後兩個python的執行檔案分別改成了 python2.exe 和  python3.exe  。這才是導致出現錯誤的具體原因。 因為我改了檔名,而pip

【Python錯誤】windows下使用pip/easy_install提示Fatal error in launcher: Unable to create process using...

windows下的python安裝完成後,會在python的安裝目錄scripts下生成幾個exe檔案,其中包括easy_install和pip, 我們將上述路徑新增到系統的環境變數後,在正常情況 下是可以使用,easy_install等工具的,但是在64位的系統中會出現

關於:Fatal error in launcher: Unable to create process using '"'報的錯

環境介紹:本人的python27版本,作業系統為:win7 32位的 首先:在輸入pip list 後系統提示為:Fatal error in launcher: Unable to create process using '"' 其次:cmd進入到dos介面,找到python27的安裝路

Using kubectl to Create a Deployment

如果你有一個正在執行的kubernates叢集,那麼你可以在它上面部署你的容器應用。你要建立一個deployment配置,它是來告訴kubernates如何建立並且更新你的應用。一旦你建立了一個deployment,kubernates master就會排程應用例項到叢集中的一個獨立的節點

__main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL do

  今天在安裝pyspider時遇到這個問題,顯示是安裝pycurl導致的,於是單獨pip install pycurl,報一樣的錯誤,如下: (general_spider) ~  pip install pycurl Collecting pycurl Using cached https

Big brands like Microsoft and Gap are using AI to create personalized ads for people

Turns out, artificial intelligence isn't just helpful for powering chatbots and voice assistants. It may also be able to help brands create emotionally int