加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
nginx.conf 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
rancedxk 提交于 2020-03-24 18:54 . no commit message
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format nginx_log_format '[$time_local] : [$http_x_forwarded_for] - [$status] - [$http_referer] - [$request] - [$http_user_agent]';
access_log logs/access.log nginx_log_format;
client_header_buffer_size 128k;
large_client_header_buffers 4 128k;
client_max_body_size 22m;
client_body_buffer_size 1024k;
sendfile on;
tcp_nopush on;
gzip on;
server{
listen 80;
#监控视频点播服务
location ~ /hls/(\w+)/index\.m3u8 {
proxy_ignore_client_abort on;
proxy_pass http://127.0.0.1:1934/$1;
proxy_redirect off;
}
#监控视频点播服务
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
add_header Cache-Control no-cache;
#后端配置支持HTTP1.1,必须配
proxy_http_version 1.1;
proxy_set_header Connection "";
#存放hls切片的路径
alias '/path/to/hls';
autoindex on;
expires 24h;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化