Standard Webserver Installation
Apache is a feature-packed webserver, with various strengths and weaknesses.
However, it is rather heavy, terrible in terms of performance, and has had a large number of exploits compared to other webservers such as NginX, IIS, and litespeed.
While NginX isn't the fastest server around either, it's relatively secure and will do the job just fine.
To get started, let's update our environment - apt update && apt upgrade, yum update, etc...
There are two ways you can go about getting nginx - getting it from a repository, or installing it yourself.
Installing from a repo is painless and simple - three commands and you're done.
apt install nginx
The second method of installing nginx is slightly harder but gives you more control over the modules you have, optimizations, support for http2 on "older" operating systems, and removal of useless features.
Most operating systems have outdated crypto libraries that either do not support alpn ( required for http2 ), feature outdated ciphers, or don't support certain commonly used curves, so I'll be using LibreSSL for this example. You may modify the --with-openssl= directive if you would rather use openssl.
Let's get started.
Retrieve the nginx source and unpack it:
tar xfv nginx-1.11.2.tar.gz
# get standard software
sudo apt -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall git zlib1g libc6
# get LibreSSL
git clone https://github.com/libressl-portable/portable.git libressl
# get PCRE
# Unpack PCRE
tar xfv pcre-8.37.tar.gz -C pcre
// get back to this later