Lighttpd and WP Super Cache
Why would you need lua scripting to serve cached static files when you instead can
- create symlinks from the wordpress root directory to everything in
wp-content/cache/supercache/(blog.hostname)/ - disable directory listings
- point
server.error-handler-404to/index.php
Like this:
$HTTP["host"] == "blag.zash.se" {
server.error-handler-404 = "/index.php"
dir-listing.activate = "disable"
}
The stuff i have in the supercache/blag.zash.se/ directory is: 2009, category, page, tag. Oh, and of course index.html, which is configured to take precedence over index.php. If you have other virtual directories in your root you will need to create symlinks for those too. And of course for each year, if you have that kind of setup.
Also, with mod_compress, there's no need for WP Super Cache's own (apparently buggy) compression. And you get compression of scripts and style sheets.
Tags: caching, lighttpd, linux, minimalism, symlink, wordpress, wp super cache
This entry was posted on Saturday, August 1st, 2009 at 08:22 and is filed under Programming. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
6 Responses to "Lighttpd and WP Super Cache"
-
chris says:
how do you handle the supercached file for the index page (probably the most popular request) -- do you make index.html first like with server.indexfiles = ( "index.html", "index.php" )?
-
chris says:
this is a great idea! i host a bunch of high-traffic WP blogs for other people though, so i don't always know when the names of pages or posts get changed, so i can adjust the symlinks accordingly. so i guess i'm sticking with the lua script.
curious how you got WP Super Cache to make a full build of your blog into the supercache directory so that you can build your symlinks, but i guess you only have 14 posts so far so it's not that hard.