http和https的區別是
有的網站,http打開的時候,頁面提示不安全,比如你點擊下面的網站 【其實是同一個網站】
http://www.511easy.com/bug/login
http://www.88bugs.com/bug/login
怎樣才能去掉這個不安全的提示呢? 從http升級到https唄
最終效果看一下:
如果目前有一個網站,要怎么升級為https呢
域名: 511easy.com
有域名了就可以申請免費的ssl證書,如下截圖,基于各個Web服務器的證書,我這邊用的是Nginx
那然后就需要配置nginx.conf的配置了,大概就是用下面的第三個,前兩個是我用來保存的。
https和http相比,更加安全,不盡然,用jmeter/charles/wireshark/fiddle等,生成一個證書,對https的網站都能進行輕易的抓包,大多數的網站和app,我都能夠進行抓包
upstream tomcatserver1 { server 127.0.0.1:8083; } upstream tomcatserver2 { server 127.0.0.1:8085; } server { listen 80; server_name 511easy.com; location / { proxy_pass http://tomcatserver1; index index.html index.htm; } }server { listen 80; server_name 511easy.com; location / { proxy_pass http://tomcatserver2; index index.html index.htm; } }
worker_processes 1; events { worker_connections 1024;} http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 80; server_name 88bugs; location / { proxy_pass http://localhost:8083; } } server { listen 80; server_name jenkins; location / { proxy_pass http://localhost:8080; } }}
worker_processes 1; events { worker_connections 1024;} http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { listen 443 ssl; server_name www.511easy.com; ssl on; ssl_certificate 1_511easy.com_bundle.crt; ssl_certificate_key 2_511easy.com.key; ssl_session_timeout 5m; location / { proxy_pass http://localhost:8083; } }}
鞏固一下這幾個縮寫名詞的含義
HTTP --- Hyper Text Transfer Protocol,超文本傳輸協議,是一種建立在TCP上的無狀態連接,整個基本的工作流程是客戶端發送一個HTTP請求
HTTPS ---- Hyper Text Transfer Protocol over Secure Socket Layer 或 Hypertext Transfer Protocol Secure
新聞熱點
疑難解答