News for hackers. Stuff that matters.
Re:Drop Root Privileges in Node.js after Binding to Port 80 by parasight on Tuesday December 04, 2012 @05:13PM (#4873579)
Please excuse my ignorance, but why would I want to run nginx to proxy requests through?
Re:Drop Root Privileges in Node.js after Binding to Port 80 by onewland on Tuesday December 04, 2012 @05:18PM (#4873601)
[This response is a guess, and very generalized]

You probably won't handle every HTTP edge case as well as nginx defaults, and you don't really need the control at that level to implement a functional, high performance web app.

Re:Drop Root Privileges in Node.js after Binding to Port 80 by cparedes on Tuesday December 04, 2012 @05:24PM (#4873645)
The reasons that other folks have mentioned (static files, nginx is built for lots of HTTP requests), as well as basic load balancing between several 'worker processes'. Sometimes you'll want to have several app server processes running with several ports open, and have nginx load balance between all of those processes (then load balance again at a higher tier between all of the different nginx processes.)
Re:Drop Root Privileges in Node.js after Binding to Port 80 by javis on Tuesday December 04, 2012 @05:19PM (#4873609)
Possibly because Nginx serves static content much faster than Node.
Re:Drop Root Privileges in Node.js after Binding to Port 80 by Wintamute on Tuesday December 04, 2012 @05:39PM (#4873725)
If you're running a few services and sites on the same box you need some sort of proxy listening on port 80 reverse proxying incoming requests to the correct internal port. i.e. an incoming request looking for "www.mynodeapi.com" could be internally routed to "127.0.0.1:8080" (or wherever your node app is listening). The proxy could be nginx, haproxy or perhaps even a node app using node-http-proxy. AFAIK, if you need proper web sockets support your proxy has to be node based or haproxy.