Based on Digital Ocean Post

nginx is a high performance web server software. It is a much more flexible and lightweight program than Apache.

Step One—Install nginx

To install nginx, open terminal and type in:

sudo apt-get install nginx

When prompted, say yes.

Step Two—Start nginx

nginx does not start on its own. To get nginx running, type:

sudo service nginx start

Step Three— Confirm That nginx Has Started

You can confirm that nginx has been installed as your web server by directing

your browser to your IP address.

**You can run the following command to reveal your virtual server’s IP address.

ifconfig eth0 | grep inet | awk '{ print $2 }'

When you visit your IP address or DNS name page in your browser, you will see the words
, “Welcome to nginx”

You can see a screenshot of the utilitarian nginx welcome page here

To ensure that nginx will be up after reboots, it’s best to add it to the startup.

Type this command into terminal:

update-rc.d nginx defaults

You may see a message like:

System start/stop links for /etc/init.d/nginx already exist.

If that is the case, then nginx is set up to run on startup!

You have now installed nginx

It's only fair to share...Share on Facebook
Share on Google+
Tweet about this on Twitter
Share on LinkedIn
Email this to someone