开发者

How do I do a reverse proxy for serving static content with a minimal server?

Thinking of serving up static content with lighttpd and t开发者_运维技巧hen dynamic content with apache running on a different server.


If the question is simply how to proxy only dynamic requests, you could probably use something like the following in your lighttpd config:

$HTTP["url"] !~ "^/static" {
    proxy.server  = ( 
        "" => (
            (
                "host" => "10.0.0.2", "port" => 8080 )
            )
        )
}

Then, put your static content (images, CSS, Javascript etc) under /static; that way, they'll be served directly by Lighty, while other requests will be proxied to Apache on 10.0.0.2, port 8080 (adjust as appropriate.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜