全國服務熱線400-0551-422 在線谘詢 留言/需求提交

nginx服務器配置https

【摘要】 nginx服務器配置https

增加如下部分即可:

server {

listen 443;
server_name player.hfyefan.cn;
ssl on;
root /video/wwwroot;
index index.html index.htm;
ssl_certificate   /video/cert/player.hfyefan.cn.cer;
ssl_certificate_key  /video/cert/player.hfyefan.cn.key;
ssl_session_timeout 5m;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
locations / {
root html;
index index.html index.htm;
}
locations ~ \.flv$ {
root /video;
flv;
limit_conn addr 20;
limit_rate 1000k;
}

locations ~ \.mp4$ {
root /video;
mp4;
limit_conn addr 20;
limit_rate 1000k;
}

locations /hls {
# Serve HLS fragments
alias /video/live;
}
}

上一篇: nginx點播和直播配置

下一篇:沒有了

資訊推薦閱讀