當前位置:首頁 » 密碼管理 » 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-07-03 23:38:45 瀏覽:943
動圖ftp後面有人追 發布:2025-07-03 23:37:46 瀏覽:125
文件上傳的java代碼 發布:2025-07-03 23:37:29 瀏覽:816
java通過橋訪問excel 發布:2025-07-03 23:28:31 瀏覽:44
安卓機如何打開天氣預報 發布:2025-07-03 23:27:15 瀏覽:855
寬頻賬號保存密碼在哪裡 發布:2025-07-03 23:20:46 瀏覽:420
qq文件夾哪些可以刪 發布:2025-07-03 23:12:41 瀏覽:156
pubg如何在韓國伺服器玩 發布:2025-07-03 23:10:44 瀏覽:515
python文件路徑變數 發布:2025-07-03 23:05:04 瀏覽:751
蘋果手機怎麼刪掉safari以存儲的密碼 發布:2025-07-03 22:56:51 瀏覽:256