简体   繁体   English

Nginx RTMP模块统计问题

[英]Nginx RTMP-module Stat Issue

I am using the nginx rtmp-module from here: https://github.com/arut/nginx-rtmp-module and there is an addition to have a stats page, well when I add it properly and go to the url like they show in the documentation, I just get a blank page. 我正在从这里使用nginx rtmp-module: https : //github.com/arut/nginx-rtmp-module ,还有一个附加功能可以提供统计信息页面,当我正确添加它并像他们一样访问url时显示在文档中,我只是得到一个空白页。 Is there anything that I am doing wrong or is there something else that I need to type into the usl besides /stat? 除了/ stat之外,我在做错什么吗?还是需要在usl中输入其他内容?

Here is my http portion of my nginx conf for more information: 这是我的Nginx conf的http部分,以获取更多信息:

http {
server {
    listen 80;
    location /stat {

        rtmp_stat all;

        rtmp_stat_stylesheet stat.xsl;
    }

    location /stat.xsl {
        root /usr/local/ngnix/html;
    }
}
}

If anyone happens to stumble upon this old post, I had the same problem. 如果有人偶然发现了这个旧帖子,我也会遇到同样的问题。
The solution was to change: 解决方案是更改:

rtmp_stat_stylesheet stat.xsl; to rtmp_stat_stylesheet /stat.xsl; rtmp_stat_stylesheet /stat.xsl;

This worked for me with version nginx-rtmp 1.1.4, nginx 1.4.6. 这对我来说适用于版本nginx-rtmp 1.1.4,nginx 1.4.6。
I believe reasoning for the added / is due to the non-standard root location for the html. 我相信添加/的原因是由于html的非标准根目录位置。 If you do not prepend the stat.xsl with the / then the dynamically generated stats page will look for the stats.xsl stylesheet in http://<domain>/stat/stat.xsl 如果您未在stat.xsl前面加上/则动态生成的stats页面将在http://<domain>/stat/stat.xsl查找stats.xsl样式表。

您将需要将stat.xsl复制到位置“ / usr / local / ngnix / html;”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM