We are using Lighttpd web server along with mod_proxy to push requests to a mongrel cluster. Our configuration is:
Code:
proxy.balance = "fair"
$HTTP["host"] == "www.mydomain.com" {
proxy.server = ("/" => (
("host" => "127.0.0.1", "port" => 3001),
("host" => "127.0.0.1", "port" => 3002),
("host" => "127.0.0.1", "port" => 3003),
("host" => "127.0.0.1", "port" => 3004)
))
}
The problem is that ALL request are forwarded to mongrel, even static content, css, js, and images. If I try replacing proxy.server = "/" with proxy.server = ".fcgi" the rails application does not work. Any ideas on how we can serve static html, images, js, css from Lighttpd, but push ruby on rails requests to the mongrel cluster?