Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
nginx.conf 1.06 KB
Copy Edit Raw Blame History
rancedxk authored 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 助手
尝试更多
代码解读
代码找茬
代码优化