2

I am working on a node.js project using OpenShift. Everything works great accept I get a 404 on my font awesome files. When I ssh I see...

ls app-deployments/current/repo/public/build/fortawesome/font-awesome/v4.0.3/fonts/
FontAwesome.css  FontAwesome.otf  fontawesome-webfont.eot  fontawesome-webfont.svg  fontawesome-webfont.ttf  fontawesome-webfont.woff

But when I try to go to

http://<gear>/build/fortawesome/font-awesome/v4.0.3/fonts/fontawesome-webfont.woff

It says...

Cannot GET /build/fortawesome/font-awesome/v4.0.3/fonts/fontawesome-webfont.woff

http://<gear>/build/fortawesome/font-awesome/v4.0.3/fonts/fontawesome/FontAwesome.css

Works fine. It also works fine locally.

Now with permission goodness

lrwxrwxrwx. 1 * *  * FontAwesome.otf 
lrwxrwxrwx. 1 * *  * fontawesome-webfont.eot 
lrwxrwxrwx. 1 * *  * fontawesome-webfont.svg
lrwxrwxrwx. 1 * *  * fontawesome-webfont.ttf 
lrwxrwxrwx. 1 * *  * fontawesome-webfont.woff 

As you can see the permissions look normal

Jackie
  • 21,969
  • 32
  • 147
  • 289
  • You do realize that 'font' is misspelled: 'fortawesome'? (though since you're misspelling it consistently, that doesn't explain the problem) – Stephen Thomas Apr 13 '14 at 20:10
  • No that is part of the component should still match what it is looking for. Otherwise the CSS file wouldn't work. Thanks for confirming though. The component was named fortawesome http://fortawesome.github.io/Font-Awesome/ – Jackie Apr 13 '14 at 20:46
  • What are the permissions on the font files? – TheSteve0 Apr 17 '14 at 18:09
  • I don't have ssh access at work but I will place on here later. I believe they were 777 though – Jackie Apr 17 '14 at 18:11
  • Posted and looks to be 777 – Jackie Apr 18 '14 at 03:07
  • Are the files actually on the box? I can't tell if the permissions you listed are on the openshift servers or local. Potentially devious workaround: you can always 64 bit encode the font directly into your stylesheet. – Parris Apr 21 '14 at 06:39
  • Haha yeah I guess that would work, I am thinking about renaming the file extensions or something as well but seems really hacky. Not to mention this is coming from a component and I don't want to change it all around (why I want to use components anyway). The permissions are from the Openshift computer and so are the others. I looked both in app deploy and app root. – Jackie Apr 21 '14 at 14:59

3 Answers3

1

Look inside your ~/app-root/repo directory and make sure the files are there, and that they have the correct permissions to web accessible.

  • Shouldn't this have been a comment not an answer? I checked both places I only posted the deployment ls because it was the one actually running. I am wondering if I change the extension and not the format if that would help. – Jackie Apr 14 '14 at 14:30
1

configure a static route using

app.use('/fontawesome', express.static(__dirname+'/fontawesome'));

Vishnuraj V
  • 2,819
  • 3
  • 19
  • 23
  • Would this be in addition to the one in public? My current path is /public/fontawesome. I also don't think this is the issue because the CSS file in the same folder is accessed fine. Did you try this and see it working? If so I will try it later – Jackie Apr 22 '14 at 15:35
  • did u try putting fontawesome-webfont.woff in fontawesome folder? – Vishnuraj V Apr 22 '14 at 16:39
1

From the permissions you posted, looks like they are symlink. Check whether your webserver has access (is following symlink) to the original file/location.

VDR
  • 2,663
  • 1
  • 17
  • 13
  • Hummm that does look like a problem. I wonder why it is getting deployed like that. The CSS file doesn't have the l, which I am assuming is indicating the link. I will try in a bit – Jackie Apr 23 '14 at 12:56
  • looks like you were right... trying to fix the issue then I will give you the bounty – Jackie Apr 23 '14 at 21:52