Support » Plugins » serve cache/html pages created by wp-super-cache using lighttpd

  • Currently I have lighttpd configured as a reverse proxy of apache. Lighttpd listens on the public IP while apache listens on Lighttpd passes non-static contents to apache using the configuration

    $HTTP[“url”] !~ “\.(js|css|gif|jpg|png|ico|txt|swf|html|htm|gz)$” {
    proxy.server = ( “” => (
    ( “host” => “”, “port” => 80 )))
    expire.url = ( “/” => “access 5 minutes”)

    This simple setup works just fine with a vanilla wordpress install. Static files are being served by lighttpd while everything else is served by apache.

    I want to take it to the next level so I installed wp-super-cache so that cache/html version of pages are created. The wp-super-cache plugin has been installed properly and its modification to the htacess file has been properly applied. I used the mod_rewrite mode of wp-super-cache and the custom permalink structure of wordpress is /%category%/%postname%.html. All works great. Cache/html pages are being created and served. There is just one little problem. It will only work if I remove the html file extesion in the above configuration. This means apache will serve the cache/html files and not lighttpd. One solution that I thought of is to have simliar rewrite rules on lighttpd when accessing html files. I do not know if it will gonna work but I searched for it anyway. I found (you may need google cache to access it because it was not working today, but yesterday it did) thinking it may be the solution but the bad news is I am using a rpm based distro and the rpm repo that I use does not have mod_magnet for lighttpd. I searched for other repos that offer lighttpd with mod_magnet but found none. So I cannot use the one solution that I have found because my lighttpd does not have mod_magnet functionality.

    What should I do to make lighttpd serve the cache/html files that were created by wp-super-cache? Is this possible?


  • The topic ‘serve cache/html pages created by wp-super-cache using lighttpd’ is closed to new replies.