3

I'm currently hosting some websites on my server, and I use Lighttpd for this.

Now I'm currently developing a web application using Node.js and I'd like to be able to create vhosts which would point to the Node.js application.

Let's say, I'd like test.com:80 to point out to myserver.org:3000. I don't believe it is possible to directly use Node.js for this since the port 80 is already registered on the machine. So the only way I'm seeing is using some kind of reversed proxy with Lighttpd. But I don't know how and with what I'm going to do so.

6

Make sure you enable lighttpd's mod_proxy first. To have all of the requests for test.com sent to the Node.js backend (assuming it's on localhost; correct?):

$HTTP["host"] == "test.com" {
  proxy.server  = ( "" => (
    ( "host" => "127.0.0.1", "port" => 3000 )
  ) )
}

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.