1. 程式人生 > 實用技巧 >007-STM32+BC26基本控制篇-基礎應用-web伺服器配置https訪問(.Windows系統)

007-STM32+BC26基本控制篇-基礎應用-web伺服器配置https訪問(.Windows系統)

<p><iframe name="ifd" src="https://mnifdv.cn/resource/cnblogs/ZLBC26AA/" frameborder="0" scrolling="auto" width="100%" height="1500"></iframe></p>

Nginx配置SSL

1.下載nginx證書

2.拷貝證書資料夾到nginx的conf目錄

3.開啟當前目錄下的 nginx.conf檔案

4.修改這個

5.修改如下

server {
    listen       443 ssl;
    server_name  mnif.cn; #填寫繫結證書的域名
    ssl_certificate      2467785_www.mnif.cn_nginx
/2467785_www.mnif.cn.pem; ssl_certificate_key 2467785_www.mnif.cn_nginx/2467785_www.mnif.cn.key; ssl_session_cache shared:SSL:1m; ssl_session_timeout 5m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #支援的TLS協議 ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;#支援的加密演算法 ssl_prefer_server_ciphers on; location
/ { root html; index index.html index.htm; } }

注: 證書路徑名稱根據自己的修改

6.退出 nginx

7.啟動

8.測試

https://mnif.cn/