在你的网站服务器配置https


通过Let’s Encrypt免费提供的证书服务,实现http使用ssl进行加密传输(https://zh.wikipedia.org/wiki/%E5%82%B3%E8%BC%B8%E5%B1%A4%E5%AE%89%E5%85%A8%E5%8D%94%E8%AD%B0),让你的网站更安全。Let’s Encrypt作为一个公共且免费SSL的项目逐渐被广大用户传播和使用,是由MozillaCiscoAkamaiIdenTrustEFF等组织人员发起,主要的目的也是为了推进网站从HTTPHTTPS过度的进程,目前已经有越来越多的商家加入和赞助支持。Let’s Encrypt免费SSL证书的出现,也会对传统提供付费SSL证书服务的商家有不小的打击。到目前为止,Let’s Encrypt获得IdenTrust交叉签名,这就是说可以应用且支持包括FireFoxChrome在内的主流浏览器的兼容和支持,虽然目前是公测阶段,但是也有不少的用户在自有网站项目中正式使用起来。[root@www ~]# cat /etc/redhat-releaseCentOS Linux release7.2.1511 (Core)[root@www ~]# nginx -Vnginx version: nginx/1.12.0built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)built with OpenSSL 1.0.1e-fips 11 Feb 2013TLS SNI support enabledconfigure arguments: –user=nginx –group=nginx –prefix=/application/nginx-1.12.0/ –with-http_v2_module–with-http_ssl_module–with-http_sub_module –with-http_stub_status_module –with-http_gzip_static_module –with-pcre[root@www~]# yum install -y yum-utils[root@www~] # yum-config-manager –enable rhui-REGION-rhel-server-extras rhui-REGION-rhel-server-optional[root@www~] # sudo yum installcertbot安装依赖:[root@www ~]# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel下载源码:[root@www ~]# wget https://github.com/git/git/archive/v2.13.0.tar.gz编译安装git[root@www ~]# tar -zxf git-2.13.0.tar.gz[root@www ~]# cd git-2.13.0[root@www git-2.13.0]# make prefix=/usr/local all[root@www git-2.13.0]# make prefix=/usr/local install检查python版本[root@www git-2.13.0]# python -VPython 2.4.3安装gcc编译器[root@www ~]# yum -y install gcc下载python源码[root@www ~]# wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz编译安装python2.7[root@www ~]# tar -zxf Python-2.7.13.tgz[root@www ~]# cd Python-2.7.13[root@www ~]#./configure[root@www ~]# make all[root@www ~]# make install[root@www ~]# make clean[root@www ~]# make distclean更改python命令指向python2.7[root@www Python-2.7.13]# mv /usr/bin/python /usr/bin/python2.4[root@www Python-2.7.13]# ln -s /usr/local/bin/python2.7 /usr/bin/python[root@www Python-2.7.13]# python -VPython2.7.13 #更新成功[root@www ~]# git clone https://github.com/letsencrypt/letsencrypt使用手动的方式获取证书yum安装certbot使用的命名[root@www ~]# certbot certonly –standalone –email 244819336@qq.com -d czlun.top -d www.czlun.topgit安装certbot使用的命令[root@www ~]# cd letsencrypt[root@www letsencrypt]# ./letsencrypt-auto certonly –standalone –email 244819336@qq.com -d czlun.top -d www.czlun.top244819336@qq.com替换成自己的邮箱czlun.topwww.czlun.top替换成自己的域名证书的位置在对应的域名下有四个生成的密钥证书文件[root@www ~]# ls /etc/letsencrypt/live/czlun.top/cert.pemchain.pemfullchain.pemprivkey.pemREADMEcert.pem – Apache服务器端证书chain.pem – Apache根证书和中继证书fullchain.pem – Nginx所需要ssl_certificate文件privkey.pem –安全证书KEY文件server{ listen 80; server_name czlun.top www.czlun.top; return 301https://www.czlun.top$request_uri;}server { listen 443 ssl; server_name czlun.top www.czlu开发云主机域名n.top; ssl on; ssl_certificate /etc/letsencrypt/live/czlun.top/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/czlun.top/privkey.pem; [该域名主机的其他配置在这]}重启nginx可以看到SSL证书生效,且HTTPS可以访问站点

相关推荐: SFB 项目经验-13-为某上市企业仅安装Skype for Business 2016(图解)

******************************************************************************《Skype for Business Server 2015-项目实战》(免费系列规划、部署博文)ht…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

(0)
打赏 微信扫一扫 微信扫一扫
上一篇 04/02 18:01
下一篇 04/02 18:02