I am trying to get stats for nginx as rtmp server, below is my config file, but I'm getting 403 on http://ip:8080/stat.xsl (also tried http://ip/stat.xsl which gives 404 and http://ip:8080/stat/stat.xsl which gives a blank page, no error).
I've copied these settings from here: https://github.com/arut/nginx-rtmp-module
Not sure what is wrong...
I need to find a way to pull stats from the rtmp server or a way of at least getting active connections.
Thanks.
rtmp {
server {
listen 1935;
chunk_size 4000;
allow play all;
application live {
allow play all;
live on;
hls on;
hls_nested on;
hls_path /HLS/hls;
hls_fragment 10s;
record off;
}
}
}
http {
include mime.types;
default_type application/octet-stream;
server {
listen 8080;
location /hls {
types {
application/vnd.apple.mpegurl m3u8;
}
alias /HLS/hls;
add_header Cache-Control no-cache;
}
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
root /root/nginx-rtmp-module-dev/stat.xsl/;
}
}
}
UPDATE : When I access http://IP:8080/stat/stat.xsl I'm seeing this in Chrome console which I think is related : Resource interpreted as Stylesheet but transferred with MIME type text/xml: http://IP:8080/stat/stat.xsl