I have a CentOS 6.5 VM set up using Apache HTTPD 2.2 as the web server and I'm using GulpJS for my build process. When I update a CSS file the GulpJS build process runs ok and if I look at the file on the VM I can see the updates, however when served via Apache HTTPD the file doesn't have the changes in it. If I edit the file using vi, make no changes and simply save it again Apache HTTPD then picks up the changes and outputs the correct file.
I have disabled the mod_cache module (e.g. commented out the LoadModule directive for it) as I thought that might be the cause but that has made no difference.
Has anyone else come across this issue and know how to fix it?
[UPDATE] - Just been looking at the httpd access log and I can see that the file is being served by httpd everytime, before and after updates but nothing changes:
192.168.56.1 - - [22/Jun/2014:09:27:42 +0100] "GET /includes/min/stylesheet.min.css HTTP/1.1" 200 135882 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36" 192.168.56.1 - - [22/Jun/2014:09:29:22 +0100] "GET /includes/min/stylesheet.min.css HTTP/1.1" 200 135878 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36"
Apart from the file length. This would suggest that httpd is seeing the file update but it is not updating in the browser. I have tried several different browsers, clearing browser caches, etc.. but until I edit the file on the server using vi and save it again no browser will load the new version of the file, which brings me back to thinking httpd is still serving the wrong version of the file. So odd.
[UPDATE 2] - I believe this might be something to do with VirtualBox and the shared folders. The files for the site are on the host (Mac OS X 10.9.3) and compiled there using NodeJS. They are compiled into a folder that is shared with the guest OS (CentOS) using VBox's shared folders. If I look at the file in the directory via the console I see:
-rwxrwxrwx. 1 root root 135881 Jun 23 2014 stylesheet.min.css
As you can see, instead of the normal Month, Day and Time for the file, it has Month, Day and Year instead. This looks out of place to me, but I have no idea what this means or if it is significant.