As explained in a previous article, we can save some headers by enabling cookie-free domains. Here is my configuration for Nginx. Only requests for static files should end up on this domain, so we don't put anything fancy in here.
My name is Michiel Roos. I currently work for Netcreators in Holland. I like tech stuff like Linux, TYPO3, Gumstix and Roombas but I also like to dig in the dirt and try to grow veggies and other things. Some of you may know me as author of nc_staticfilecache and maintainder of the DAM project.
Well . . . I like code without typo's. It just runs better ;-)
As explained in a previous article, we can save some headers by enabling cookie-free domains. Here is my configuration for Nginx. Only requests for static files should end up on this domain, so we don't put anything fancy in here.
In Nginx, the old Apache static file cache configuration no longer works. We will need to write a new one.
We only want to redirect to a static file if a number of conditions are met. With mod_rewrite you can just chain a number of RewriteCond's together and follow them up with a RewriteRule. In Nginx there is no way to directly chain together a series of if statements. Nesting is also not allowed. We. . .
Nginx comes with a lot of modules. You can read all about them on the Nginx wiki. The syntax of the configuration files differs from Apache syntax, but up to now everything I need is possible. There are also a lot of nifty new features like an empty gif configuration. We can use this to serve an empty gif right from memory without having to. . .
Last week I was searching for a bit of a performance boost for my site running on a Linode package. It's pretty OK, but not 'zippy' at all. During my search I came across a lot of interesting articles about Squid, lighttpd, Varnish and Nginx. EVO techblog has an article. . .