Best way to deploy my node.js app on a Varnish/Nginx server
Posted
by
Saif Bechan
on Server Fault
See other posts from Server Fault
or by Saif Bechan
Published on 2012-03-18T15:07:23Z
Indexed on
2012/03/18
18:02 UTC
Read the original article
Hit count: 251
I am about to deploy a brand new node.js application, and I need some help setting this up.
The way my setup is right now is as follows.
I have Varnish running on external_ip:80
I have Nginx behind running on internal_ip:80
Both are listening on port 80, one internal port, one external.
NOTE: the node.js app runs on WebSockets
Now I have the my new node.js application that will listen on port 8080.
Can I have varnish set up that it is in front of both nginx and node.js.
Varnish has to proxy the websocket to port 8080, but then the static files such as css, js, etc has to go trough port 80 to nignx.
Nginx does not support websockets out of the box, else I would so a setup like:
varnish -> nignx -> node.js
© Server Fault or respective owner