letsencrypt 免费https安装过程linux centos
生活随笔
收集整理的這篇文章主要介紹了
letsencrypt 免费https安装过程linux centos
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
curl https://get.acme.sh | sh
?
~/.acme.sh/?再修改conf的配置
/home/nginx-1.12.1/conf 目錄里的nginx.conf
server {server_name www.demo.com;location / {rewrite root html/index/;}}重啟 nginx
/home/nginx-1.12.1/sbin/nginx -s reload
運(yùn)行
?我用的是nginx 安裝再home目錄下 所以我的文件目錄路徑是 /home/nginx-1.12.1/html/index?
acme.sh --issue -d mydomain.com -d www.mydomain.com --webroot /home/wwwroot/mydomain.com/?得到success
現(xiàn)在我們的文件在系統(tǒng)根目錄下? 查看
cd ./.acme.sh/linux 里 前面帶 . 的文件是不會(huì)被顯示的,我們可以用這個(gè)命令直接進(jìn)到此目錄查看文件
最后通過(guò)443跳轉(zhuǎn)到https? 設(shè)置nginx.conf文件
server {server_name www.demo.com;location / {rewrite ^/(.*)$ https://ws.yixingcx.com/$1 permanent;}} server {listen 443 ssl;server_name www.demo.com demo.com;ssl on;ssl_certificate /root/.acme.sh/demo.com/fullchain.cer;ssl_certificate_key /root/.acme.sh/demo.com/demo.com.key ;ssl_session_cache shared:SSL:1m;ssl_session_timeout 5m;ssl_ciphers HIGH:!aNULL:!MD5;ssl_prefer_server_ciphers on;location / {proxy_http_version 1.1;proxy_set_header Connection "upgrade";proxy_pass http://127.0.0.1:8080;proxy_redirect off;}}重啟
/home/nginx-1.12.1/sbin/nginx -s reload?
success
總結(jié)
以上是生活随笔為你收集整理的letsencrypt 免费https安装过程linux centos的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: “互联网+”促传统企业三大转型
- 下一篇: Linux 串口编程二 深入了解 ter