Book Image

Lighttpd

By : Andre Bogus
Book Image

Lighttpd

By: Andre Bogus

Overview of this book

Table of Contents (20 chapters)
Lighttpd
Credits
About the Author
About the Reviewer
Preface
HTTP Status Codes

mod_proxy_core and backends


Since version 1.5.0, the dynamic page processing interface core functionality was consolidated into mod_proxy_core and only the differences between the interfaces moved into a backend for each. This reduces duplication, with some obvious benefits. Less duplicated code implies less stuff in memory, less chances for errors, more testing for the core, and optimizations apply to all interfaces.

The syntax has changed a little, for example, we no longer assign path prefixes to configurations, but use selectors to reduce the reach of the backends.

Suppose that we want to use mod_proxy_core, we add it to server_modules along with the backends we want. Then we carve out a niche for each backend and configure the backends. For example, to use SCGI for a python application and FastCGI for PHP, we write:

server.modules = ( ...,
"mod_proxy_core",
"mod_proxy_backend_fastcgi",
"mod_proxy_backend_scgi", # see appendix B for all backends.
... )
$HTTP["url"] =~ ".py" { # use SCGI...