Standard Webserver Installation

Aug 20, 2017
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...

    Ubuntu Instructions:
    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.
    Code (Text):

    add-apt-repository ppa:nginx/stable
    apt update
    apt install nginx
    Your configuration files will be in /etc/nginx. There will be a followup on configuration [[here]]

    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:

    Code (Text):

    tar xfv nginx-1.11.2.tar.gz
    Let's enter the nginx directory and prepare for installation:

    Code (Text):

    cd nginx-1.11.2
    # get standard software
    sudo apt -y install curl wget build-essential libgd-dev libgeoip-dev checkinstall git zlib1g libc6
    # get LibreSSL
    git clone libressl
    # get PCRE
    # Unpack PCRE
    tar xfv pcre-8.37.tar.gz -C pcre
    # configure
    // get back to this later
  • Loading...
  • Loading...