Installing and configuring NGINX

Let’s install NGINX and Node/npm. If you're still logged in as root, log out and reauthenticate as the new user you’ve just created. To install NGINX (on Ubuntu), simply type this:

apt-get install nginx

Most other Unix package managers will have NGINX installers.

To start NGINX, use this:

service nginx start

Full documentation for NGINX can be found at: https://www.nginx.com/resources/wiki/start/.

You should now be able to point your browser to the IP you were assigned (check your inbox if you've forgotten) and see something like this:

Now, let's set up the two servers that NGINX will balance.

Create an additional ...

Get Mastering Node.js - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.