문제

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

도움이 되었습니까?

해결책

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

다른 팁

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

configure a static route using

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top