字体真棒不与Apache 2.4.x的工作 [英] font-awesome not working with Apache 2.4.x

查看:149
本文介绍了字体真棒不与Apache 2.4.x的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在我的项目静态使用字体真棒(FA)和Apache 2.4.x的图标将不会出现。发配合Apache 2.2.x的,和Python的SimpleHHTPServer。

When I try to statically use font-awesome (fa) in my project with Apache 2.4.x the icons will not show up. Fa works with apache 2.2.x, and Python's SimpleHHTPServer.

这是不是其中显示,而不是图标的框中的IE / Firefox的问题。

This is not the IE/Firefox issue where a box is displayed instead of the icon.

我在Dreamfactory(OSX)利用这一点,但我也试图香草阿帕奇从具有相同效果的MacPorts。

I am using this in Dreamfactory (OSX), but I have also tried vanilla Apache from MacPorts with the same results.

Chrome的控制台报告以下页面加载时:

Chrome's console reports the following when the page loads:

资源间preTED的样式,但使用MIME类型text / troff的转移: <$c$c>\"http://localhost:8080/files/applications/CADRe/bower_components/font-awesome/css/font-awesome.min.css\".

Resource interpreted as Stylesheet but transferred with MIME type text/troff: "http://localhost:8080/files/applications/CADRe/bower_components/font-awesome/css/font-awesome.min.css".

发安装有凉亭和我包括它是这样的:

Fa was installed with bower and I am including it like this:

<link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet">

我的项目还包括angularjs和引导。

My project also includes angularjs and bootstrap.

推荐答案

在运行DreamFactory管理控制台,你看到的图标?那些使用CDN引导来提供字体真棒。

When you run the DreamFactory admin console, do you see icons? Those use the Bootstrap CDN to serve up font awesome.

这可能是一个Apache的配置问题,在这种情况下,你需要修改Apache配置支持MIME类型:

This could be an apache config issue , in which case you'd need to edit your apache config to support the mime type:

AddType application/vnd.ms-fontobject eot
AddType font/truetype ttf
AddType application/x-font-woff woff

我会把这个作为一个评论,但是这是一个新的帐户,我不允许的。

I would put this as a comment, but this is a new account, and I'm disallowed.

这篇关于字体真棒不与Apache 2.4.x的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆