Objective
Install Nginx Web Server (LEMP) on Ubuntu 18.04. In particular, this Linux web server install guide shows you how to install Nginx, how to install MariaDB and how to install PHP.
Distributions
Ubuntu 18.04 Bionic Beaver
Requirements
A working install of Ubuntu 18.04 with root privileges
Difficulty
MEDIUM
Conventions
- # – requires given linux commands to be executed with root privileges either directly as a root user or by use of
sudo
command - $ – requires given linux commands to be executed as a regular non-privileged user
Introduction
If you want to run PHP-based websites on Linux, Apache isn’t your only option. Nginx is a faster, lighter weight, web server that’s fairly easy to configure and get running. Plus, it’s excellent at handling other tasks like load balancing, server optimization, and acting as a reverse proxy. Actually, Nginx is a top choice among startups for hosting their web applications.
Setting Nginx up to host PHP on Ubuntu 18.04 is very simple, and you only need a few packages installed to get started.