Install nginx on Ubuntu 14.04

In howto on Jan 30, 2016 by theoryl Tagged: , , , ,

This is yet another guide about how to install nginx on Ubuntu 14.04. nginx is an open source web server that has recently gained popularity. It’s particularly well suited for serving static content.

nginx ver 1.4.6 is available from the official Ubuntu repository, so:

sudo apt-get install nginx

is all you have to do. The configuration file nginx.conf is located at /etc/nginx/nginx.conf. The default configuration is good enough so you don’t have to change anything there. To start serving a static site, just modify /etc/nginx/sites-enabled/default to set the ip address, the root directory, and the domain. See Ubunto nginx doc.

After that, reload nginx by doing either

sudo service nginx reload


sudo nginx -s reload

Put an index.html file in the root directory. Then, point your browser to the ip address to see it. Voila!

* Ubuntu nginx doc:
* Official nginx doc:
* Introduction to Nginx and LEMP on Ubuntu 14.04 by Justin Ellingwood:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: