[英]Getting a 404 on Nginx RTMP Module stats file
我不明白為什么在Nginx RTMP模塊中設置統計視圖時會得到404的原因。
我在Google Cloud上使用Ubuntu VM。
我已將stat.xsl文件放在/ var / www / html中
這是Nginx資產的默認位置,如sites-enabled / default文件夾中所指定:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www;
index index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
}
這是我在nginx.conf中復制/粘貼並修改的代碼段:
server{
listen 80;
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
# under linux you could use /var/user/www for example
root html;
}
}
這里的目標是能夠鍵入[my-ip-address / stat並獲取格式化的xsl內容。
這里有些東西我沒有得到-請幫忙嗎?
您是否嘗試過輸入/ statOR?
server {
listen 80;
server_name localhost;
# rtmp statistics
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
# under linux you could use /var/user/www for example
root html;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.