Nginx http升级到https的完整步骤

  

<强> http和https的区别是

  

有的网站,http打开的时候,页面提示不安全,比如你点击下面的网站【其实是同一个网站】

  http://www.511easy.com/bug/login

  http://www.88bugs.com/bug/login

  

 Nginx http升级到https的完整步骤

  

 Nginx http升级到https的完整步骤”>,</p>
  <p>怎样才能去掉这个不安全的提示呢?从http升级到https呗</p>
  <p>最终效果看一下:</p>
  <p> <img src=

  

如果目前有一个网站,要怎么升级为https呢

  

域名:511 easy.com

  

有域名了就可以申请免费的ssl证书,如下截的图,基于各个Web服务器的证书,我这边用的是Nginx

  

 Nginx http升级到https的完整步骤

  

那然后就需要配置nginx.conf的配置了,大概就是用下面的第三个,前两个是我用来保存的。

  

, https和http相比,更加安全,不尽然,用查尔斯jmeter//wireshark/小提琴等,生成一个证书,对https的网站都能进行轻易的抓包,大多数的网站和应用程序,我都能够进行抓包

        上游tomcatserver1 {   服务器127.0.0.1:8083;   }   上游tomcatserver2 {   服务器127.0.0.1:8085;   }            服务器{   听80;   server_name 511 easy.com;         位置/{   proxy_pass http://tomcatserver1;   指数指数。html你;   }   }   服务器{   听80;   server_name 511 easy.com;      位置/{   proxy_pass http://tomcatserver2;   指数指数。html你;   }   }            worker_processes 1;      事件{   worker_connections 1024;   }         http {   包括mime.types;   default_type应用程序/八进制;      sendfile>   worker_processes 1;      事件{   worker_connections 1024;   }         http {   包括mime.types;   default_type应用程序/八进制;      sendfile>   worker_processes 1;      事件{   worker_connections 1024;   }         http {   包括mime.types;   default_type应用程序/八进制;      sendfile;      keepalive_timeout 65;         服务器{   听443 ssl;   server_name www.88bugs.com;      ssl_certificate 1 _88bugs.com_bundle.crt;   ssl_certificate_key 2 _88bugs.com.key;   ssl_session_timeout 5米;      位置/{   proxy_pass http://localhost: 8083;   }   }      服务器{   听443 ssl;   server_name www.511easy.com;      ssl_certificate 1 _511easy.com_bundle.crt;   ssl_certificate_key 2 _511easy.com.key;   ssl_session_timeout 5米;      位置/{   proxy_pass http://localhost: 8085;   }   }   }      https://www.88bugs.com/bug/login

  

https://www.511easy.com/ ,,【目前修改后是指向另一个端口的项目了】

  

  

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对的支持。

Nginx http升级到https的完整步骤