# Nginx serving old version of CSS file

**URL:** <https://www.ruby-forum.com/t/nginx-serving-old-version-of-css-file/214065>\
**Category:** NGINX\
**Created:** [November 20, 2011, 10:16pm UTC](https://www.ruby-forum.com/t/nginx-serving-old-version-of-css-file/214065 "2011-11-20T22:16:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [November 20, 2011, 10:16pm UTC](https://www.ruby-forum.com/t/nginx-serving-old-version-of-css-file/214065/1 "2011-11-20T22:16:58Z")

</div>

I have spent 2 hours trying to get to the bottom of a problem and am  
utterly stumped. I am certain it must be something I’m doing wrong, and  
NOT an nginx problem, but I can’t think for the life of me what it might  
be. What is happening is that nginx is serving up a version of a CSS  
file which I overwrote a couple of hours ago. It’s version 0.7.65  
running on Linux. I have a CSS file called temp.css, which I have in the  
/css folder below the root of a virtual host called kf.dev. If I look in  
the folder and view the file with less, I can see it’s the correct one.  
But when I do ‘wget [http://kf.dev/css/temp.css](http://kf.dev/css/temp.css)’ I get an old version. In  
fact, when I try in Firefox to see a page which uses this css file, it  
doesn’t display properly and when I click on the CSS link in View  
Source, I see the old version with what appears to be a load of binary  
characters at the bottom (they display as little question marks against  
black diamonds). As I say, I am completely stumped. Where could nginx be  
getting this from? I have determined that there is in fact only one file  
actually called this on the hard drive, so it can’t be finding the wrong  
copy of the file. I’m beginning to think this might be some weird  
operating system level corruption. Possible?

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [November 21, 2011, 6:30am UTC](https://www.ruby-forum.com/t/nginx-serving-old-version-of-css-file/214065/2 "2011-11-21T06:30:55Z")

</div>

Hi,

On Mon, Nov 21, 2011 at 5:16 AM, John M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and when I click on the CSS link in View Source, I see the old version with  
> what appears to be a load of binary characters at the bottom (they display  
> as little question marks against black diamonds). As I say, I am completely  
> stumped. Where could nginx be getting this from? I have determined that  
> there is in fact only one file actually called this on the hard drive, so  
> it can’t be finding the wrong copy of the file. I’m beginning to think this  
> might be some weird operating system level corruption. Possible?

Did you turn on open\_file\_cache in your configuration? It’s buggy.

Regards,

---

<div class="post-metadata">

**Author:** ![jmaenpaa](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/9de053/32.png) [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Post date:** [November 21, 2011, 10:36am UTC](https://www.ruby-forum.com/t/nginx-serving-old-version-of-css-file/214065/3 "2011-11-21T10:36:17Z")

</div>

On 21/11/11 05:30, Joshua Z. wrote:

> Did you turn on open\_file\_cache in your configuration? It’s buggy.

No, I didn’t. I actually made no change to the configuration other than  
adding the virtual host.

I have, for the moment, solved the problem by moving the root to a  
different location, with the result that the CSS is now served fine. I  
think it must be to do with a bug in VirtualBox, which I have been using  
to provide virtualization. I have a Linux virtual machine running under  
Windows 7. I had moved the virtual host’s root to a folder shared from  
the host, so I could work on the website under Windows 7 (and have it  
served by a Linux server). I think there must be a bug in the shared  
folder functionality in the version of VirtualBox I’m using.
