I have a Lighttpd server as a front end for Ruby on rails.
Some subdomains (server1.domain.com, server2.domain.com) are configured with proxy.
But also have a standard static web server at www.domain.com.
It works, but the call without subdomain (domain.com) does not work.
How could I configure Lighttpd for it?
Configuration for proxy:
$HTTP["host"] =~ "www.domain." {
alias.url = ( "/system/" => "/var/www/system/" )
proxy.balance = "fair"
proxy.server = ( "" => (
( "host" => "127.0.0.1", "port" => 5750)
)
)
}
Configuration for server1 and server2:
$HTTP["host"] =~ "server1.domain." {
alias.url = ( "/system/" => "/var/www/system/" )
proxy.balance = "fair"
proxy.server = ( "" => (
( "host" => "127.0.0.1", "port" => 7757 ) ,
( "host" => "127.0.0.1", "port" => 5222),
( "host" => "127.0.0.1", "port" => 5223)
)
)
}
$HTTP["host"] =~ "server2.domain." {
alias.url = ( "/system/" => "/var/www/system/" )
proxy.balance = "fair"
proxy.server = ( "" => (
( "host" => "127.0.0.1", "port" => 7787 ) ,
( "host" => "127.0.0.1", "port" => 5282),
( "host" => "127.0.0.1", "port" => 5283)
)
)
}