Nginx ROCKS! In this Nginx Tutorial, we’re going to setup Nginx to receive http requests to our domain name (port 80), then proxy to our Express.js Node.js App, which is running on port 3000.

View Nginx Configuration Code here: https://gist.github.com/learncodeacademy/ebba574fc3f438c851ae

We’re also going to set it up Nginx load balancing, so the http requests will get evenly distributed between all of our servers.
See full documentation on Load Balancing (upstream) here: http://nginx.org/en/docs/http/ngx_http_upstream_module.html

Lastly, we’re going to setup static file caching on Nginx, so our css, js and image files are only served from our Node.js application the first time…this DRASTICALLY improves application performance.

Source: LearnCode.academy

Category:

Development

Tags:

Comments are closed.