winshining / nginx-http-flv-module

A media streaming server based on nginx-rtmp-module. In addtion to the features nginx-rtmp-module provides, HTTP-FLV, GOP cache, VHosts (one IP for multi domain names) and JSON style statistics are supported now.
BSD 2-Clause "Simplified" License
2.72k stars 567 forks source link

stat.xsl 页面不显示 #187

Closed xengine-qyt closed 3 years ago

xengine-qyt commented 3 years ago

nginx1.19.5 v1.2.8 我输出到指定目录的 prefix 然后wget https://github.com/winshining/nginx-http-flv-module/blob/master/stat.xsl 我访问这个页面 显示空白,上次配置都好的,重做系统重新弄了下不知道为啥不显示了 我抓包看了下 get到数据了. 配置文件如下

`user root; worker_processes 1;

pid logs/nginx.pid;

error_log logs/error.log error;

load_module /root/nginx/modules/ngx_http_flv_live_module.so;

events { worker_connections 4096; }

http { include mime.types; default_type application/octet-stream;

#log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
#                  '$status $body_bytes_sent "$http_referer" '
#                  '"$http_user_agent" "$http_x_forwarded_for"';
sendfile        on;
#tcp_nopush     on;

#keepalive_timeout  0;
keepalive_timeout  65;

#gzip  on;

server {
    listen       8080;
    server_name  localhost;

    #charset koi8-r;

    #access_log  logs/host.access.log  main;

    location / {
        root   html;
        index  index.html index.htm;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   html;
    }

    location /flv {
        flv_live on; #打开 HTTP 播放 FLV 直播流功能
        chunked_transfer_encoding on; #支持 'Transfer-Encoding: chunked' 方式回复

        add_header 'Access-Control-Allow-Origin' '*'; #添加额外的 HTTP 头
        add_header 'Access-Control-Allow-Credentials' 'true'; #添加额外的 HTTP 头
    }

    location /hls {
        types {
            application/vnd.apple.mpegurl m3u8;
            video/mp2t ts;
        }

        root /root/nginx/html/hls;
        add_header 'Cache-Control' 'no-cache';
    }

    location /dash {
        root /root/nginx/html/dash;
        add_header 'Cache-Control' 'no-cache';
    }
    location /stat {         #推流播放和录制统计数据的配置
        rtmp_stat all;
        rtmp_stat_stylesheet stat.xsl;
    }
    location /stat.xsl {
        root /stream-stat; #指定 stat.xsl 的位置
    }
    location /control {
        rtmp_control all; #rtmp 控制模块的配置
    }
}

} `

xengine-qyt commented 3 years ago

哦...是文件不对...