Carlos Castillo
Carlos Castillo

Reputation: 68

Stylesheets not working in nginx virtual machine

i'm desperate. My stylesheets are just not working. I don't get it. When i try to debug them in Chrome I get this:

Red dots of doom

I've never encountered this problem before. It's driving me crazy. I'm simply adding them in the <head> section of the html page: <link rel="stylesheet" href="/css/cry-with-me.css">

What should those awful red dots of doom mean? My css is fine, because when i update the style live, it works. And also every time i add a new stylesheet, the website does use the styles. But the moment i update them or do the slightest modification to the original file, this red dots appear. Maybe it has to do something with browser caching, but I tried using incognito mode, opening other browsers, everything.

Perhaps the solution is pretty straightforward, but i can't for the live of me make it work. Or does it have to do with my nginx server setup? mmmm....

Upvotes: 0

Views: 522

Answers (1)

Carlos Castillo
Carlos Castillo

Reputation: 68

i figured it out (well, found a link on the internets to go about it) and though i should just put it here in case anyone runs into this. It turns out sendfile (which is used to copy data between one file descriptor and another gets really messed up when running on a virtual machine (Virtualbox on Vagrant, in my case). So you just have to go into the nginx.conf file and set sendfile to off. And don't forget to restart nginx after that.

Here is the article that helped me sort this out:
http://jeremyfelt.com/code/2013/01/08/clear-nginx-cache-in-vagrant/#comment-1846

Upvotes: 1

Related Questions