Skip to content

Instantly share code, notes, and snippets.

@kosyfrances
Last active March 14, 2016 11:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kosyfrances/760826838bd01517c543 to your computer and use it in GitHub Desktop.
Save kosyfrances/760826838bd01517c543 to your computer and use it in GitHub Desktop.
How to install nginx on Ubuntu 14.04 LTS

#Install Nginx

For Ubuntu 10.04 and newer:

sudo -s
nginx=stable # use nginx=development for latest development version
add-apt-repository ppa:nginx/$nginx
apt-get update
apt-get install nginx

If you get an error about add-apt-repository not existing, you will want to install python-software-properties.
Copied from https://www.nginx.com/resources/wiki/start/topics/tutorials/install/#

Once the installation is complete the nginx service should automatically start and begin listening on port 80. Find your server’s IP address by running the following command:

ip addr show eth0 | grep inet

In this case we are assuming that eth0 is configured with the primary public IP of your server. Your result may look similar to:

inet xxx.xxx.xxx.xxx/22 brd yyy.yyy.yyy.yyy scope global eth0

Where xxx.xxx.xxx.xxx is the IP address of your server.

Verify that nginx is running by visiting http://xxx.xxx.xxx.xxx. For example: http://1.2.3.4.
Copied from http://www.liquidweb.com/kb/how-to-install-nginx-on-ubuntu-14-04-lts/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment