Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 使用lighttpd为wp super cache创建的缓存/html页面提供服务_Apache_Wordpress_Caching_Lighttpd_Reverse Proxy - Fatal编程技术网

Apache 使用lighttpd为wp super cache创建的缓存/html页面提供服务

Apache 使用lighttpd为wp super cache创建的缓存/html页面提供服务,apache,wordpress,caching,lighttpd,reverse-proxy,Apache,Wordpress,Caching,Lighttpd,Reverse Proxy,目前,我已将lighttpd配置为apache的反向代理。Lighttpd在公共IP上侦听,而apache在127.0.0.1上侦听。Lighttpd使用配置将非静态内容传递给apache $HTTP["url"] !~ "\.(js|css|gif|jpg|png|ico|txt|swf|html|htm|gz)$" { proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port"

目前,我已将lighttpd配置为apache的反向代理。Lighttpd在公共IP上侦听,而apache在127.0.0.1上侦听。Lighttpd使用配置将非静态内容传递给apache

    $HTTP["url"] !~ "\.(js|css|gif|jpg|png|ico|txt|swf|html|htm|gz)$" {
        proxy.server  = ( "" => (
            ( "host" => "127.0.0.1", "port" => 80 )))
        expire.url = ( "/" => "access 5 minutes")
    }
这个简单的设置与普通的wordpress安装配合得很好。静态文件由lighttpd提供,而其他所有文件都由apache提供

我想把它带到下一个级别,所以我安装了wp super cache,以便创建页面的cache/html版本。wp super cache插件已正确安装,其对htacess文件的修改已正确应用。我使用了wp super cache的mod_重写模式,wordpress的自定义永久链接结构是/%category%/%postname%.html。一切都很好。正在创建和提供缓存/html页面。只有一个小问题。只有在上述配置中删除html文件extesion时,它才会起作用。这意味着apache将提供缓存/html文件,而不是lighttpd。我想到的一个解决方案是让simliar在访问html文件时重写lighttpd上的规则。我不知道它是否会起作用,但我还是搜索了它。我发现你可能需要谷歌缓存来访问它,因为它今天不工作,但昨天它确实认为这可能是解决方案,但坏消息是我使用的是基于rpm的发行版,我使用的rpm repo没有用于lighttpd的mod_磁铁。我搜索了其他提供带有mod_磁铁的lighttpd的回购协议,但没有找到。因此,我无法使用我找到的唯一解决方案,因为我的lighttpd没有mod_磁铁功能

我应该怎么做才能使lighttpd为wp super cache创建的缓存/html文件提供服务?这可能吗


谢谢

我知道,有点晚了,但你可以试试我的WP Super Cache rewrite.lua脚本版本。它就像它必须工作一样工作