Difference between revisions of "Nginx"
Line 1: | Line 1: | ||
== About == | |||
Nginx (pronounced engine-x) is web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. It's also a modern alternative to something like Apache, IIS, or Caddy. | |||
== Prerequisites == | |||
An nginx installation should be pretty accessible regardless of your OS. This guide is specifically written for Ubuntu Server 18.04 LTS, but should work on any other type of Unix operating system. | |||
* nginx/1.14.0 (Ubuntu) | |||
* PHP 7.2.10-0ubuntu0.18.04.1 (cli) | |||
* MySQL v14.14 Distribution 5.7.24 | |||
If you've just installed a new operating system, you'll want to update your local package index by running <code>sudo apt-get update</code>. | |||
== Installing nginx == | |||
To start, you're going to want to install nginx using the aptitude package manager. You can do this by running <code>sudo apt-get install nginx</code>. Once you run that, you'll want to go through the configuration prompt that appears. | |||
After nginx and its subsequent dependencies have finished installing, you'll want to let it through the firewall by running <code>sudo ufw allow 'Nginx HTTP'</code>. Check what your current IP is by running <code>ifconfig</code>, and then look for whatever interface looks correct. In this instance, the proper interface is <code>eth0</code>. |
Revision as of 16:02, 26 November 2018
About
Nginx (pronounced engine-x) is web server which can also be used as a reverse proxy, load balancer, mail proxy and HTTP cache. It's also a modern alternative to something like Apache, IIS, or Caddy.
Prerequisites
An nginx installation should be pretty accessible regardless of your OS. This guide is specifically written for Ubuntu Server 18.04 LTS, but should work on any other type of Unix operating system.
- nginx/1.14.0 (Ubuntu)
- PHP 7.2.10-0ubuntu0.18.04.1 (cli)
- MySQL v14.14 Distribution 5.7.24
If you've just installed a new operating system, you'll want to update your local package index by running sudo apt-get update
.
Installing nginx
To start, you're going to want to install nginx using the aptitude package manager. You can do this by running sudo apt-get install nginx
. Once you run that, you'll want to go through the configuration prompt that appears.
After nginx and its subsequent dependencies have finished installing, you'll want to let it through the firewall by running sudo ufw allow 'Nginx HTTP'
. Check what your current IP is by running ifconfig
, and then look for whatever interface looks correct. In this instance, the proper interface is eth0
.