lighty's life

lighty developer blog

Mod_proxy_core Commited to Svn

mod_proxy_core just got commited to SVN and is now available to testers.
server.modules = ( ..., "mod_proxy_core", .. )

## works
$HTTP["url"] =~ "^/proxyme/" {
  proxy-core.balancer = "round-robin"
  proxy-core.protocol = "http"
  proxy-core.backends = ( "wikipedia.org" )

  ## to be done
  proxy-core.rewrite-response = (
    "Location" => ( 
      "^http://en.wikipedia.org/(.*)" => "http://127.0.0.1:1025/$1" ) )
  proxy-core.rewrite-request = (
    "URI" => (
      "^/proxyme(/.*)" => "$1" ) )
}
The above config forwards everything from /proxyme/ to wikipeedia.org. It resolves the domain wikipedia.org and is using one of the address to forward the request. As you already see there will be a request and response header rewriter for rewriting Location headers and URIs.

What works ?

* Round-Robin Load-Balancing * Failover of a backend is down * HTTP proxying * HTTP/1.1 * Keep-Alive

What is missing

* FastCGI, SCGI and CGI backends * Header Rewriting

Show me the source, Luke

In the "source-browsers "://trac.lighttpd.net/trac/browser/branches/lighttpd-merge-1.4.x/src/mod_proxy_core.c you can also take a look at the code to see what is going on in there.

Please note that we won't accept comments for posts older than 3 months! Also please use our bug tracker to report bugs, and our irc channel #lighttpd@libera to chat.

« The New mod_proxy_core Reverse-Proxying mod_proxy_core »