Hello World

这个是标题,但是为什么要有标题

这个是子标题,但是为什么要有子标题

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

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

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

 

 

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

 

 

 

 但是这个时候,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

 

posted on 2021-03-29 14:19  swuxyj  阅读(920)  评论(0编辑  收藏  举报

导航

Hello World