Lighthttpd proxy reverse proxy

lighttpdPROXYreverse-proxy

I have been looking for good easy to use examples for lighthttpd proxy reverse proxy.
My idea is to take domain example.com and forward/reverse proxy to ip 192.168.0.1 port 80, whether it is a tomcat server or apache web server.

Or even to take example.com and proxy it to facebook.com

Any ideas?

Best Answer

It's fairly simple:

$HTTP["host"] == "www.example.com" {
proxy.server = (
    "" => (
        ("host" => "127.0.0.1", "port" =>8000)
    )
)
}