Attila Fulop
Attila Fulop

Reputation: 7011

File Not Found Errors in apache error log with webfonts

I keep getting File Not Found errors in apache log like this:

[Sat Jun 08 14:05:34 2013] [error] [client 7x.9x.1x1.xx] File does not exist: /mnt/www/www.site.com/versions/live/assets/fonts/agendmedextcon.eot) format("embedded-opentype"), url(.., referer: http://www.site.com/Rest/Of/Url

At the same time I have this font definition in css:

@font-face {
    font-family: 'Agenda Medium Condensed';
    src: url('../fonts/agendmedextcon.eot');
    src: url('../fonts/agendmedextcon.eot') format('embedded-opentype'),
         url('../fonts/agendmedextcon.woff') format('woff'),
         url('../fonts/agendmedextcon.ttf') format('truetype'),
         url('../fonts/agendmedextcon.svg#RomAgendaMediumExtraCondensedRegular') format('svg');
}

The fonts are loading fine, neither have I found errors in the browser's console. Still those lines are polluting the error log, and I still think they're there with a reason.

Do you have any idea how to find where the error is coming from?

Upvotes: 2

Views: 1314

Answers (1)

Matt Berkowitz
Matt Berkowitz

Reputation: 975

I've seen 404 errors reported by some browsers (mostly Firefox iirc) if I wasn't serving fonts with the proper mime type or if they're being served from a CDN (or any external server) without the proper CORS headers. Not sure if it's what your problem is but it's worth looking at

Here's mime type info: http://somethinginteractive.com/blog/2012/06/04/proper-mime-types-for-embedded-font-face-fonts/

and CORS: https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS (Access-Control-Allow-Origin is what you want)

Hope it helps

Upvotes: 3

Related Questions