I've just set up a lighttpd server which i want to use to serve multiple applications on different domains.

I've managed to make traffic to a spesific domain to be redirected to an application running on another port like this:

$HTTP["host"] =~"my-domain.com" {
proxy.balace = "round-robin" proxy.server = ( "/" =>
    ( ( "host" => "127.0.0.1", "port" => 8080 ) ) )

}

I know i don't need the balance thing, but i have it just in case i'm going to sometime.

Anyway, the problem is that i want the all the traffic to "my-domain.com" to go to "my-domain.com/my-tomcat-app".

I know i can rename the war to ROOT.war, i would like to solve this using lighttpd redirect or something so i can host multiple apps if i want to.

So basically how do i get traffic to "my-domain.com" to go to "my-domain.com/my-tomcat-app"?

link|improve this question
feedback

migrated from stackoverflow.com Oct 20 '11 at 11:02

This question came from our site for professional and enthusiast programmers.

1 Answer

Just create and configure "fake" http root directory with no files.

server.document-root = "/var/www"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown