2

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 specific domain to be redirected to an application running on another port like this:

$HTTP["host"] =~"my-domain.com" {
proxy.balance = "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"?

tijko
  • 111
  • 3
lassejl
  • 121
  • 3

1 Answers1

2

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

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

Paul Rudnitskiy
  • 413
  • 2
  • 5