New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Approach for reverse proxy setup?
So I've got a bunch of Node.js applications running on multiple VMs. I would like to consolidate all of them onto one and trying to figure out how this is possible.
The reason why I did this is because I've got subdomains (A records) pointing to each Node.js application which is running on port 80.
Would setting up nginx as a reverse proxy to all these different node apps on one server work? How would you approach this? Would you be willing to lend a hand?
Comments
Nginx/lighttpd reverse proxy is very easy to setup, or for something with built in SSL try Caddy.
If it's high traffic or you want more advanced features such as failover, give haproxy a try.
EDIT: Running each application on a different port or binding it to an internal IP, then proxying to that internal IP or port is how I would do it.
Any good tutorials you could point me to?
https://www.digitalocean.com/community/tutorials/how-to-use-haproxy-to-set-up-http-load-balancing-on-an-ubuntu-vps is good, but I reccomend reading and understanding the configuration file (see manuals or wiki page) for whatever you use over any tutorials.
Thanks, I'll check it out. Also willing to pay for someone to complete this for me.
This guy is a genius with Nginx:
https://github.com/perusio/drupal-with-nginx
I use his configuration with great success for Drupal with Nginx+PHP-FPM. But you might be able to glean something from his Apache with Nginx reverse proxy optional configuration.
I always thought 98% node.js application uses reverse proxy
Yes in production.