O'Reilly logo

Mastering Node.js - Second Edition by Kevin Faaborg, Sandro Pasquali

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required