I've set up my config like this:
$HTTP["host"] =~ "(^|\.)domain1\.com$" {
fastcgi.server = ( "/domain1.py" =>
((
"socket" => "/tmp/fastcgi.socket",
"bin-path" => "/home/domain1/serveV03.py",
"max-procs" => 1,
"bin-environment" => (
"REAL_SCRIPT_NAME" => ""
),
"check-local" => "disable"
))
)
server.document-root = "/home/domain1"
url.rewrite-once = (
"^/favicon.ico$" => "/static/favicon.ico",
"^/static/(.*)$" => "/static/$1",
"^/(.*)$" => "/domain1.py/$1"
)
}
$HTTP["host"] =~ "(^|\.)domain2\.com$" {
fastcgi.server = ( "/domain2.py" =>
((
"socket" => "/tmp/fastcgi.socket",
"bin-path" => "/home/domain2/serveV01.py",
"max-procs" => 1,
"bin-environment" => (
"REAL_SCRIPT_NAME" => ""
),
"check-local" => "disable"
))
)
server.document-root = "/home/domain2"
url.rewrite-once = (
"^/favicon.ico$" => "/static/favicon.ico",
"^/static/(.*)$" => "/static/$1",
"^/(.*)$" => "/domain2.py/$1"
)
}
But somehow, when I access domain2.com domain1.py gets launched - Strangely the contents in /static/ are correctly pulled from /home/domain2/static.
When I enter domain1.com everything works as expected. Why does the domain-matching fail like this?