Project

General

Profile

Actions

Docs ModProxyCore » History » Revision 3

« Previous | Revision 3/51 (diff) | Next »
jakabosky, 2006-12-12 22:53


{{{
#!rst

===================
the Proxy Interface ===================

----------------------
Module: mod_proxy_core
----------------------

.. contents:: Table of Contents

Description ===========

...

Options =======

lighttpd provides the Proxy support via the proxy-module
(mod_proxy_core) which provides the following options in the config-file:

:proxy-core.balancer:
might be one of 'round-robin', 'sqf' or 'carp'.

:proxy-core.protocol:
might be one of 'http', 'fastcgi' or 'scgi'.

:proxy-core.backends:
tell the module where to send Proxy requests to.
It is a list of hostname/ip address/unix-domain socket

Example: ========

Using lighttpd + mod_proxy_core in front of 8 Squids which handle the
caching of dynamic content for you. All requests for the host
www.example.org should be forwarded to the proxy. All proxies
listen on port 80 for requests. ::

$HTTP["host"] == "www.example.org" {
proxy-core.protocol = "http"
proxy-core.balancer = "sqf"
proxy-core.rewrite-request = (
"Host" => ( ".*" => "www.example.org" )
)
proxy-core.backends = ( "10.0.0.10",
"10.0.0.11",
"10.0.0.12",
"10.0.0.13",
"10.0.0.14",
"10.0.0.15",
"10.0.0.16",
"10.0.0.17" )
}

If one of the hosts goes down the all requests for this one server are
moved equally to the other servers. If you want to know more about
the algorithm used here google for 'Microsoft CARP'.

for php ::

$HTTP["url"] =~ "\.php$" {
proxy-core.balancer = "round-robin"
proxy-core.protocol = "fastcgi"
proxy-core.check-local = "enable"
proxy-core.backends = ( "127.0.0.1:1026" )
proxy-core.max-pool-size = 16
}

}}}

Updated by jakabosky about 18 years ago · 51 revisions