On Mon, 17 Jul 2006 16:54:18 -0200, Manlio Perillo <[EMAIL PROTECTED]> wrote:
An interesting question is:
when one should consider the option of serving static content with a
server like lighttpd, and forward with mod_proxy requests for dynamic
content to twisted web?
Fairly easy. Just be sure that all the static content is served from a known
(or many _known_) urls like: /static/...
Thus you can use the following rule:
$HTTP["host"] =~ "^(testing.stiq.it|localhost)$" {
url.rewrite-once = (
"^/static/.*" => "$0",
"^/favicon.ico$" => "/static/$0",
"^/(.*)" => "/vhost/http/%0/$1"
)
$HTTP["url"] !~ "^/(static/|favicon.ico)" {
proxy.server = ( "" =>
( (
"host" => "127.0.0.1",
"port" => 8080
) )
)
}
server.document-root = "/usr/local/src/repos/stiq/"
}
Given the rewrite rule urls are rewritten once and then matched to see if
the request should be proxied or served by lighttpd from the document root.
_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web