全国服务热线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;
location / {
root html;
index index.html index.htm;
}
location ~ \.flv$ {
root /video;
flv;
limit_conn addr 20;
limit_rate 1000k;
}

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

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

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

下一篇:没有了

资讯推荐阅读