當前位置:首頁 » 密碼管理 » nginxhls加密

nginxhls加密

發布時間: 2023-07-12 23:52:50

『壹』 如何在Nginx中添加SSL證書以支持HTTPS協議訪問

獲得Nginx環境SSL證書

安裝流程:

  1. 環境檢測,檢測命令如下(測試nginx是否支持SSL)nginx-V

  2. 如果有輸入 –with-http_ssl_mole 表示已編譯openssl,支持安裝ssl

  3. 如果沒有安裝請下載nginx源碼重新編譯:./configure--with-http_stub_status_mole--with-http_ssl_mole
    make&&makeinstall

  4. 配置Nginx
    server{
    listen80;
    listen443ssl;
    server_namewww.gworg.cn;
    ssl_protocolsTLSv1.2TLSv1.1TLSv1;
    ssl_certificate/etc/ssl/yourdomain.com.crt;
    ssl_certificate_key/etc/ssl/yourdomain.com.key;
    ssl_prefer_server_cipherson;
    #自動跳轉到HTTPS(可選)
    if($server_port=80){
    rewrite^(.*)$https://$host$1permanent;
    }
    location/{
    root/home/web/;
    indexindex.php;
    }
    }

  5. 以上配置僅供參考,其他參數請根據生產環境需要添加。

  6. 安裝後重啟nginx使其生

解決辦法:SSL證書可以在Gworg申請,然後根據以上文檔安裝,Nginx證書分為:crt公鑰與key私鑰2個文件。

熱點內容
sql格式化日期函數 發布:2025-07-03 20:22:52 瀏覽:395
大容量存儲盒評測 發布:2025-07-03 20:14:58 瀏覽:159
死鎖貪心演算法 發布:2025-07-03 20:14:47 瀏覽:39
演算法項目目標 發布:2025-07-03 19:47:07 瀏覽:770
手機開屏密碼多少 發布:2025-07-03 19:35:48 瀏覽:803
我的世界夢世界伺服器怎麼重啟 發布:2025-07-03 19:33:20 瀏覽:547
編譯型語言快 發布:2025-07-03 19:31:57 瀏覽:416
mud伺服器搭建 發布:2025-07-03 19:28:37 瀏覽:496
雲存儲空間怎麼繳費 發布:2025-07-03 19:22:45 瀏覽:637
雙機熱備虛擬ip怎麼配置域名 發布:2025-07-03 19:09:18 瀏覽:356