nginx-http-flv配置

hls配置

hls配置放在 http.server里面

text 复制代码
http {
  server {
      # HTTP监听端口
      listen 8002;

      location /hls {
          types {
              application/vnd.apple.mpegurl m3u8;
              video/mp2t ts;
          }
          alias ./temp/hls;  # HLS文件存放路径,请替换为你实际的路径
          expires -1;
          add_header 'Cache-Control' 'no-cache';
      }
  }
}

启动以后就可以通过 http://localhost:8002/hls/xxx.m3u8来访问了

相关推荐
似水এ᭄往昔3 小时前
【Linux】自动化构建-make/Makefile
linux·运维·服务器·ubuntu
顶点多余4 小时前
Linux“信号“从硬件到软件详解
linux·运维·服务器
瀚高PG实验室5 小时前
rpm包安装报错:cannot open Packages index using db5 - Cannot allocate memory (12)
linux·运维·服务器·瀚高数据库
追风少年王大爷丶5 小时前
nginx 配置无域名访问拒绝
运维·服务器·nginx
black方块cxy5 小时前
实现一个输入框多个ip以逗号分隔最多20组,且ip不能重复
java·服务器·前端
线束线缆组件品替网5 小时前
Amphenol RJE1Y22A53644401线束详解与替代网络线束选型指南
运维·服务器·网络·智能路由器·电脑·51单片机
TG_yunshuguoji6 小时前
阿里云代理商: 阿里云部署OpenClaw 个性化配置指南 3 大场景模板详解
服务器·阿里云·云计算·openclaw
SeanDe6 小时前
Linux grep 命令用法详解
linux·服务器·网络
W.W.H.6 小时前
Linux共享文件夹不显示,每次都要重新加载问题解决
linux·运维·服务器
2401_835792547 小时前
Linux复习笔记
linux·服务器·笔记