How To Configure Node.js With Lighttpd
Added by JustinK101 over 14 years ago
We are looking at setting up a node.js server to experiment with, and wondering how we would set it up with lighttpd? Just off the top of our head, perhaps mod_proxy?
proxy.balance = "fair" $HTTP["host"] == "domainnamehere.com" { $HTTP["url"] = "\.(js)$" { proxy.server = ("" => ( ("host" => "127.0.0.1", "port" => 3000) )) } }
Replies (3)
RE: How To Configure Node.js With Lighttpd - Added by stbuehler over 14 years ago
Yes, mod_proxy should work (I couldn't find a fastcgi server module for Node.js, but i guess it shouldn't be too hard to write one).
RE: How To Configure Node.js With Lighttpd - Added by JustinK101 over 14 years ago
One thing, how do you distinguish regular Javascript which should be served from Lightttpd, and Node.JS javascript that should be passed off to the Node.JS binary? They both by default have the .js extension. Perhaps we must add a custom extension for node Javascript like: .nodejs.
RE: How To Configure Node.js With Lighttpd - Added by tobsn about 14 years ago
yeah i suggested the .nodejs extension, also .njs and .nojs to dahl and others and they rejected because its ".js". i asked them ahead of time because i was concerned about exactly this problem.