Passenger 未应用样式,但可以下载
我使用apache2和phusion的passenger在Centos 6上安装了Redmine。
我可以正常访问Redmine,并且所有控件似乎都可以工作。问题是这一切看起来都没有风格。
如果我从渲染的 html 中逐字访问样式表的 url,它会很好地提取它。如果我将样式表的样式直接嵌入到页面中,它就会按预期呈现。
我没有收到任何 apache 或 Redmine 错误,并且我确实在 apache 的访问日志中看到了对样式表的请求。
在 css 选项卡上的 firebug 中,它不显示任何样式,但将“application.css”文件作为资产,当我单击“编辑”时,它会很好地加载数据。
我清除了缓存并要求周围的人尝试,我们都遇到了同样的问题。我尝试过重新启动服务器和Redmine应用程序。
更奇怪的是,IE8 正确显示。 IE9、FF、Safari、Chrome均无法正确显示页面。
Redmine也是文档根目录,它不在子目录中。
我使用 ajax 请求进行了测试,并且也能够正常检索样式。我此时唯一的假设是我没有正确配置 Passenger,并且请求资源的浏览器发送的用户代理或标头不同并且受到某种影响?这是我得到的最好的猜测。
非常感谢任何帮助。
I installed Redmine on Centos 6 using apache2 and phusion's passenger.
I can access Redmine fine and all the controls seem to work. The issue is it all appears un-styled.
If I visit the url of the stylesheet verbatim from the rendered html it pulls it up fine. If I embed the styles of the stylesheet directly into the page it renders as it should.
I'm not getting any apache or Redmine errors and I do see requests for the stylesheets in apache's access log.
In firebug on the css tab it shows no styles but has the 'application.css' file as an asset and when I click edit it loads the data just fine.
I cleared my cache as well as asked people around me to try and we all get the same issue. I've tried restarting the server and the Redmine application.
To make it even more odd, IE8 displays correctly. IE9, FF, Safari and Chrome all display the page incorrectly.
Redmine is also the document root, it is not in a subdirectory.
I tested using an ajax request and was able to retrieve the styles ok also. My only assumption at this point is that I don't have Passenger configured correctly and the user agent or headers sent by a browser requesting resources is different and somehow affected? That is the best guess I got.
Any help is very greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了这个问题。 Apache 返回 text/plain 作为 mimetype。通过添加修复
到 .htaccess
I found the issue. Apache was returning text/plain as the mimetype. Fixed by adding
To .htaccess