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" => "", "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"?


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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.