Question around Gzip static and CDN

Rakesh Rajan rakeshxp at
Fri Aug 22 17:33:55 MSD 2008


I have recently moved serving static files from Apache to Nginx ( 0.7.11 
). As a part of build, I gzip JS and CSS files and have complied nginx 
using --with-http_gzip_static_module .

When I access the page using, 
http://static0.<mydomain>.com/js/test.v1.js , nginx serves the page 
fine. The response headers looks like

/Server nginx/0.7.11
Date Fri, 22 Aug 2008 13:26:12 GMT
Content-Type application/x-javascript
Content-Length 1034
Last-Modified Fri, 22 Aug 2008 12:12:49 GMT
Connection keep-alive
Content-Encoding gzip
Expires Sat, 22 Aug 2009 13:26:12 GMT
Cache-Control max-age=31536000

/I am using Softlayer CDN ( which is backed by the above nginx ). Now, 
the same request using the CDN does not work ( returns a 404 ).

Note: In case I have only test.js ( instead of only test.js.gz ) then 
both nginx and CDN works fine. And in case I have only test.js.gz then 
only nginx works

Thanks in advance!


More information about the nginx mailing list