nginx之nginx.conf配置
2016-06-28 19:07
302 查看
rtmp {
server {
listen 1935;
application myapp {
live on;
#record keyframes;
#record_path /tmp;
#record_max_size 128K;
#record_interval 30s;
#record_suffix .this.is.flv;
#on_publish http://localhost:8080/publish;
#on_play http://localhost:8080/play;
#on_record_done http://localhost:8080/record_done;
}
application hls {
live on;
hls on;
hls_path /tmp/app;
hls_fragment 5s;
}
}
}
http {
server {
listen 8080;
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root <path-to-nginx-rtmp-module>;
}
location /control {
rtmp_control all;
}
#location /publish {
# return 201;
#}
#location /play {
# return 202;
#}
#location /record_done {
# return 203;
#}
location /rtmp-publisher {
root <path-to-nginx-rtmp-module>/test;
}
location /hls {
#server hls fragments
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias /tmp/app;
expires -1;
}
location / {
root <path-to-nginx-rtmp-module>/test/rtmp-publisher;
}
}
}
server {
listen 1935;
application myapp {
live on;
#record keyframes;
#record_path /tmp;
#record_max_size 128K;
#record_interval 30s;
#record_suffix .this.is.flv;
#on_publish http://localhost:8080/publish;
#on_play http://localhost:8080/play;
#on_record_done http://localhost:8080/record_done;
}
application hls {
live on;
hls on;
hls_path /tmp/app;
hls_fragment 5s;
}
}
}
http {
server {
listen 8080;
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root <path-to-nginx-rtmp-module>;
}
location /control {
rtmp_control all;
}
#location /publish {
# return 201;
#}
#location /play {
# return 202;
#}
#location /record_done {
# return 203;
#}
location /rtmp-publisher {
root <path-to-nginx-rtmp-module>/test;
}
location /hls {
#server hls fragments
types{
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
alias /tmp/app;
expires -1;
}
location / {
root <path-to-nginx-rtmp-module>/test/rtmp-publisher;
}
}
}
相关文章推荐
- nginx之worker_connections
- nginx之rtmp-module模块编译
- nginx多条件if判断后rewrite,减轻后端php工作压力(随笔)
- nginx + Lua 实现自定义WAF
- nginx多域名代理配置文件模版(
- 欢迎使用CSDN-markdown编辑器
- NGINX配置location总结及rewrite规则写法
- location nginx
- nginx root && alias 文件路径配置
- NGINX 快速入门
- CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14
- nginx下载、windows系统安装、设置欢迎页
- nginx 的中文配置详细解释
- nginx location的配置
- Nginx与Lua执行顺序
- nginx 配置虚拟主机
- nginx location 匹配规则
- Nginx配置文件详解
- nginx - 性能优化,突破十万并发
- 配置nginx,支持php的pathinfo路径模式