當前位置:首頁 » 密碼管理 » 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個文件。

熱點內容
壓縮安裝器 發布:2025-09-16 03:47:17 瀏覽:177
特產網源碼 發布:2025-09-16 03:42:24 瀏覽:327
安卓faceplay怎麼付款 發布:2025-09-16 03:32:34 瀏覽:582
安卓rom包里有什麼 發布:2025-09-16 03:07:57 瀏覽:351
sql2005無法連接 發布:2025-09-16 03:04:21 瀏覽:680
預埋件演算法 發布:2025-09-16 02:55:45 瀏覽:91
php取差集 發布:2025-09-16 02:46:58 瀏覽:972
ah腳本掃貨 發布:2025-09-16 02:44:53 瀏覽:71
加密相冊在哪裡找到 發布:2025-09-16 02:37:30 瀏覽:632
我的世界公益伺服器 發布:2025-09-16 02:26:18 瀏覽:833