2

I've one domain example.com and two sub domains of it docs.example.com & bugs.example.com. And I've two applications running at ports 8080 & 8090. How to configure Lighttpd so that, it can forward all the requests at docs.example.com to 8090 and bugs.example.com to 8080.

Arnab Das
  • 133
  • 1
  • 5

1 Answers1

1

Assuming you have enabled mod_proxy in lighttpd. Paste this at the end of the configuration file and restart lighttpd.

$HTTP["host"] == "docs.example.com"
{   
   proxy.server = (
     "" => (
       "host" => (
         "host" => "127.0.0.1",
         "port" => 8080
       )
     )
   ) 
}

I'm not really sure if you'd be needing the "host" => 127.0.0.1 line. It depends on how you are running the server on your machine.

m13r
  • 174
  • 8
deppfx
  • 429
  • 3
  • 13