gedit /etc/nginx/sites-enabled/default

location /hlstest {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias /home/wanqi/work_plu/hls/;
add_header Cache-Control no-cache;
}
location ^~ /media/ {
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias /home/wanqi/work_plu/hls/;
add_header Cache-Control no-cache;
}

最后sudo service nginx restart

nginx 配置其他路径的更多相关文章

  1. nginx配置虚拟路径下载文件(.apk)

    公司将安卓apk文件放到服务器上,实现用户点击链接并下载 nginx version 1.14.1 nginx配置修改 server { listen 80; server_name localhos ...

  2. Nginx 配置日志路径(nginx.conf没有写log路径,所以debug的时候找不到日志)

    缘由:nginx.conf没有写log路径,所以debug的时候找不到日志,遂在conf文件里写入了log路径 Setp1.nginx默认日志路径: /var/log/nginx Setp2.conf ...

  3. 安装Alertmanager,nginx配置二级路径代理访问

    安装配置 Alertmanager wget https://github.com/prometheus/alertmanager/releases/download/v0.20.0/alertman ...

  4. nginx配置图片路径

    首先, 在linux下创建你存放资源的目录,例如:/data/images:用于存放图片. 下一步,打开default.conf配置文件找到server块下的location添加如下 location ...

  5. Nginx配置proxy_pass转发的/路径问题

    Nginx配置proxy_pass转发的/路径问题 在nginx中配置proxy_pass时,如果是按照^~匹配路径时,要注意proxy_pass后的url最后的/,当加上了/,相当于是绝对根路径,则 ...

  6. Nginx静态文件路径配置

    root目录与alias目录的区别 Nginx路径location配置中,使用root目录与alias目录的区别 1)alias指定的目录是准确的,即location匹配访问的path目录下的文件直接 ...

  7. nginx配置访问图片路径(windows)

    简介 Nginx(("engine x")由俄罗斯的程序设计师Igor Sysoev所开发)是一款自由的.开源的.高性能的HTTP服务器和反向代理服务器:同时也是一个IMAP.PO ...

  8. nginx配置路径问题

    编译了一个程序放在服务器上,通过nginx配置转发访问.例如在配置下图的地址 d:\wayne\nginxWeb\www: 发现无法正常运行,查看error.log发现是有问题的,当创建文件时,ngi ...

  9. Nginx配置实例-反向代理实例:根据访问的路径跳转到不同端口的服务中

    场景 Ubuntu Server 16.04 LTS上怎样安装下载安装Nginx并启动: https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/detai ...

随机推荐

  1. MSVC 报错 unable to use inline in declaration get error C2054

    晚上用cmake生成了一份lua-cjson的工程文件,msvc6的 编译时报错 后来再stackoverflow找到答案:unable to use inline in declaration ge ...

  2. IOS 从一个小地方想到……

    //(一个比较好的地方是 : cancel代表取消的意思,suspended,表示已经挂起,这些英文记住了用来命名挺好的,看看别人的过去时都是加ed的,就是这么强,所以语法不好的话,多关注ios的命名 ...

  3. redis hash map

    redis hash的使用详见文章:http://www.miaoyueyue.com/archives/235.html hash操作命令如下: hset(key, field, value):向名 ...

  4. Awesome Machine Learning

    https://github.com/josephmisiti/awesome-machine-learning 包含了很多的machine-learning开源的资源,包括各种语言的machin l ...

  5. C#字段中加入list<类字段> 的两种写法

    类1 public class NumCon { public string zsNum { get; set; } } 类2 public class RepeatMess //重复数据响应 { p ...

  6. 【java】:定时任务

    PS:转 http://blog.csdn.net/lotusyangjun/article/details/6450421/

  7. centos安装youcompleteme

    哈哈,我又回来了,简单的重新装了一边虚拟机,又把vim配置了一遍,这回有信心把youcomplete的安装方法贴出来了,先给个权威的链接,然后给出具体步骤,保证没问题可以安装成功 http://www ...

  8. DataTable与List互换

    public static class List2DataTable { #region "Convert Generic List to DataTable" /// <s ...

  9. GDI+技术

    GDI+是GDI的后继者,它是一种构成 Windows XP 操作系统的子系统的应用程序编程接口. 一般来说有3种基本类型的绘图界面,分别为Windows 窗体上的控件.要发送给打印机的页面和内存中的 ...

  10. maven打包时使用的pom配置

    <build> <plugins> <!-- compiler插件, 设定JDK版本 --> <plugin> <groupId>org.a ...