Tuesday, 1 September 2015

Moving a site with no movement

This morning I was testing switching one of my sites over from Apache to Nginx. After changing the 'app' handling the site in my webhost, I tested the site, but there was no style applied. I checked the page source, and when I clicked on the CSS file, got a 404.

I checked the CSS file existed, and it did. I checked the Server logs, and there was nothing in the error log for the site. In the access log it didn't mention the request for the CSS file at all! I tried requesting the CSS file again, and this time it loaded.

I can't understand how that could happen at all. The CSS file was on the same domain / subdomain as the site. It's as if the front-end web server had passed most of the requests to my nginx back end, but for the first two requests to the CSS file decided to just generate a 404. (Since the requests for the CSS file didn't seem to be hitting my nginx at all). It wasn't a cached 404 as I haven't accessed this site for ages, it wouldn't have been 404 anyway, and I cleared my cache yesterday. Just seems plain weird to me.

No comments: