首先发现stat.xsl的请求是404,发现是因为我的stat.xsl目录定位,攻略里面写的xsl目录,和我这里的目录不一致。

修改目录后,stat.xsl的请求是403 ,查看Nginx日志:

Nginx+rtmp构建时,localhost/stat显示为空白

 

 

最后将xsl文件移动到Nginx的html目录下,成功请求到xsl文件,restart nginx :

Nginx+rtmp构建时,localhost/stat显示为空白

 

Nginx+rtmp构建时,localhost/stat显示为空白

 

 

 但是这个时候,xsl被不正确解析,还是看不到内容,看到控制台显示的内容是:

Resource interpreted as Stylesheet but transferred with MIME type text/xml: "http://ip:8080/stat/stat.xsl"

谷歌一下发现解决方案:https://stackoverflow.com/questions/53073274/nginx-as-rtmp-server-resource-interpreted-as-stylesheet-but-transferred-with-m

需要vi conf/mime.types

If you want stat.xsl to be type application/xml, the line in the types block should read application/xml xsl

 

相关文章:

  • 2021-12-18
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2021-07-31
  • 2021-10-24
  • 2021-09-28
  • 2022-12-23
猜你喜欢
  • 2021-10-26
  • 2022-02-21
  • 2021-07-19
  • 2022-12-23
  • 2022-12-23
  • 2021-07-13
相关资源
相似解决方案