2015-07-13 28 views
0

我不明白爲什麼我在Nginx RTMP模塊中設置我的統計視圖時會得到404。在Nginx RTMP模塊統計文件上獲得404

我遵循的說明相當straightforward尤其是here

我在Google Cloud上使用Ubuntu VM。

我已經把我的stat.xsl文件在/ var/www/html等

這是Nginx的資產的默認位置,在啓用的站點 - /默認文件夾指定:

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; 
       } 

     } 

這裏的目標是能夠輸入[我-IP地址/ STAT,並得到格式化的XSL內容。

這裏有東西我沒有得到任何幫助嗎?

回答

0

你嘗試過輸入/ 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;