The problem with
nginX caching happened when I used
ntpdate ntp.ubuntu.com to sync my server clock.
Now when I request the path
http://www.example.com/project/create I receive the old PHP file that I was working on.
I tried to set
nginx.conf and even turned off caching in
cloudFlare for my DNS, but gain no success.
When I looked into the header part with
curl -I http://www.example.com/project/create I had the below response:
HTTP/1.1 302 Moved Temporarily │ Server: nginx │ Date: Fri, 15 Aug 2014 10:51:38 GMT │ Content-Type: text/html │ Connection: keep-alive │ Set-Cookie: PHPSESSID=cihsfrq6aoat5baun8dem01go5; path=/ │ Expires: Thu, 19 Nov 1981 08:52:00 GMT │ Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 │ Pragma: no-cache │ Location: http://www.example.com/site/login
I couldn't find any nginx cache folder to delete. I've restarted nginX after all those changes but gained nothing. I cannot think of any other reason why this is happening.
Is seems that when I use
ntpdate ntp.ubuntu.com, it changes server time to
7:25 while my time is
16!? File modifications are now 16, the old date, while my system time is 7:25. If I change my time to 16 then my pusher will throw an error and says that timestamp given is expired:
string(112) "Timestamp expired: Given timestamp (2014-08-15T20:06:20Z) not within 600s of server time (2014-08-15T11:39:59Z) "