Home » Categories » Multiple Categories

How To Install nginx on Ubuntu 12.04 LTS

About nginx

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

Set Up

The steps in this tutorial require the user to have root privileges. You can see how to set that up in the Initial Server Setup Tutorial in steps 3 and 4.

Install nginx

To install nginx, open terminal and type in:
sudo apt-get install nginx
When prompted, say yes. nginx is now installed on your virtual private server.

Start nginx

nginx does not start on its own. To get nginx running on your server, type:
sudo service nginx start

RESULTS: 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 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, and you are all set.

Congratulations! You have now installed nginx
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
How To Configure and Maintain Ghost from the Command Line
Viewed 1223 times since Sun, Dec 29, 2013
How To Launch Your Site on a New Ubuntu 12.04 Server with LAMP, SFTP, and DNS
Viewed 1428 times since Thu, Dec 26, 2013
How To Configure Single and Multiple WordPress Site Settings with Nginx
Viewed 3187 times since Sat, Jan 4, 2014
How To Manage Packages In Ubuntu and Debian With Apt-Get & Apt-Cache
Viewed 1415 times since Fri, Dec 27, 2013
How to Scale Django: Beyond the Basics
Viewed 1257 times since Fri, Jan 3, 2014
How To Create Nagios Plugins With Bash On Ubuntu 12.10
Viewed 1071 times since Sat, Jan 4, 2014
Top 10 Linux Easter Eggs
Viewed 1908 times since Sat, Jan 4, 2014
How To Install Rails, Apache, and MySQL on Ubuntu with Passenger
Viewed 2049 times since Mon, Dec 23, 2013
How to Setup a Multi-Protocol VPN Server Using SoftEther
Viewed 3681 times since Thu, Jan 2, 2014
How To Set Up mod_security with Apache on Debian/Ubuntu
Viewed 2195 times since Thu, Dec 26, 2013