NGINX Fundamentals: High Performance Servers from Scratch
4.6 (3,935 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
19,571 students enrolled

NGINX Fundamentals: High Performance Servers from Scratch

Learn how to install & configure an Nginx web server from scratch.
4.6 (3,935 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
19,563 students enrolled
Created by Ray Viljoen
Last updated 5/2020
English [Auto], Portuguese [Auto], 1 more
  • Spanish [Auto]
Current price: $86.99 Original price: $144.99 Discount: 40% off
1 day left at this price!
30-Day Money-Back Guarantee
This course includes
  • 4 hours on-demand video
  • 21 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Learn to create custom Nginx web servers
  • Customise your Nginx install
  • Secure & optimise your server
  • Add an invaluable skill to your resume
  • Verifiable certificate of completion
  • Understand basic networking concepts
  • Be comfortable using the command line

*** Complete Update Just Launched ! - NGINX 2018 - All Lessons Updated ***

Learn to install, configure and tweak NGINX to create secure, high performance web servers from scratch.

Build a strong foundation in NGINX with this practical course suited to both beginners and the more experienced.

  • Learn to customise the NGINX installation

  • Configure NGINX as a web server

  • Install & configure a server-side programming language as an NGINX backend

  • Learn to tweak NGINX for optimal performance

  • Secure NGINX with some security best practises

An invaluable skill for any techie or developer in the web industry

NGINX is the fastest growing and most popular web server for a reason, so understanding it will be an invaluable skill to anyone working in the web industry, specially network admins & web developers.

This course will provide a very practical and concise approach to learning NGINX and will give you a solid base to immediately start creating secure, high performance web servers.

Content and Overview

With 39 concise and practical lectures, this course aims to teach a solid foundational understanding of NGINX and is suitable for anyone with a basic understanding of networking and the linux command line interface.

The course starts by looking at the differences between NGINX and Apache for those with Apache experience and then explains the different ways of installing NGINX, customising your install, and configuring NGINX as a service.

The installation section also covers updating NGINX without downtime and adding/removing modules.

The bulk of the course is then focussed on configuring NGINX as a web server, including connecting it to a PHP backend and configuring some of NGINX's best features, such as Gzipping and GeoIP.

The final section will go over securing the server and the user via SSL and other security best practices.

Upon completion of this course you will have the practical skills to immediately start building secure, high performance web servers or improve and better understand existing hosting solutions you might work with.

This course is to the point and everything is demonstrated in the most simple, yet practical ways.

We do not focus on the theory, but get straight to installing, configuring and learning!

Who this course is for:
  • This course is aimed at Nginx newbies looking to get started as quickly and effectively as possible.
  • The aim is to get a practical understanding of Nginx as a real-world web server and not dig into all of it's features.
  • The course does not cover hosting/networking concepts, but rather assumes an understanding of the basic principles and use of commands such as curl.
Course content
Expand all 39 lectures 03:55:43
+ Overview
3 lectures 07:33

What to expect from this course.

Preview 01:47

A quick look at NGINX's backstory and basic architecture.


Apache has been the go to web server for years, and many students will be familiar with it, this video explain just how NGINX differs from Apache and the pros and cons of each, including:

  • Performance
  • Memory Usage
  • Server-side language configuration
  • URI handling
NGINX vs Apache
Test your knowledge
1 question
+ Installation
5 lectures 24:28

An overview of the lesson structure:

  • Demo server
  • File transfer clients
  • Terminal and Editor
Server Overview

Learn the most basic way to install and start NGINX, using a package manager such as apt-get or yum.

Preview 05:30

How to configure and compile a customised NGINX install from source:

  • Downloading source code
  • Configuring custom source code compilation options
  • Adding non-default modules
Building Nginx from Source & Adding Modules

Learn to add a custom NGINX install as a systemd service, for easier process management.

Adding an NGINX Service

An overview of why this course excludes Windows

Nginx for Windows
Test your knowledge
1 question
+ Configuration
12 lectures 01:16:35

Understand NGINX configuration terminology, like context and directive, in order to follow along and make use of the NGINX documentation.

Understanding Configuration Terms

Learn to configure the most basic static file server.

  • Create a new server context (virtual host)
  • Configure static file serving and mime types.
Preview 07:01

Learn to configure location blocks (contexts):

  • Custom URI matching with various modifiers
  • Modifier priorities
Location blocks

Use NGINX variables & conditionals:

  • Built in variables
  • User defined variables
  • Conditional statements (if)

Understand the difference between redirects & rewrites and how rewritten URIs are re-evaluated.

Rewrites & Redirects

Learn how the try_files directive works in detail.


  • Standard try_files implementation
  • Rewrite-flow
  • Using named locations
Try Files & Named Locations

Fine tune error & access logs for better debugging and optimised performance.


Understand different types of directives and how inheritance applies to each:

  • Standard Directive
  • Action Directive
  • Array Directive
Inheritance & Directive types

Learn to install and configure a standalone server-side language processor (PHP-FPM)

  • PHP-FPM installation
  • NGINX to PHP-FPM socket communication configuration
  • Permissions configuration
PHP Processing

Configure NGINX worker processes and file limits to match server capabilities. 

Worker Processes

An overview of key buffer & timeout directives:

  • What buffering is
  • Why a server buffers data
  • How to optimise buffer and timeout configurations
Buffers & Timeouts

Learn to safely rebuild NGINX with the current build configuration whilst adding new modules:

  • Getting the current NGINX build configuration
  • Building new modules into NGINX
  • Enabling dynamic modules
Adding Dynamic Modules
Test your knowledge
7 questions
+ Performance
5 lectures 40:43

Configure resource-specific Expires Headers to help improve client-side performance and reduce server load.

Headers & Expires

Learn how to enable and configure Gzipping of static resources, drastically reducing server to client transfer data.

Compressed Responses with gzip

Improve dynamic language responses by enabling server-side caching.


  • Configuring FastCGI caching
  • Understanding cache entries and entry matching
  • Adding cache status headers
  • Creating cache exceptions
FastCGI Cache

Add the HTTP2 module:

  • Understanding HTTP2 vs HTTP1.1
  • Compiling the module into NGINX
  • Generating self-signed SSL certificates
  • Enabling SSL
  • Enabling and testing for HTTP2

Learn to implement a very basic server push using HTTP2.

Server Push
+ Security
5 lectures 46:09

Fine-tune the SSL configuration by adding:

  • Optimised SSL protocols
  • Optimised ciphers suites
  • Enable Diffie Hellman Key Exchange
  • Cache SSL session

Learn to configure NGINX rate limiting:

  • Set limiting factor:
    • User IP
    • Request
    • Server name
  • Manage limiting behaviour by adding burst allowances and nodelay
Rate Limiting

Secure specific parts of the server via username &  password authentication.
Learn to use apache-utils to generate a password file and configure NGINX to secure requests to specific URIs.

Preview 03:33

Some best practises for securing an NGINX server, including:

  • Removing unused default modules
  • Hiding server information
  • Restricting site embedding

    Hardening Nginx
    Test your knowledge
    3 questions

    A supplementary lesson on using Lets Encrypt on NGINX to generate free SSL certificates.

    This lesson covers:

    • An overview of Lets Encrypt as a service.
    • Certbot install and usage.
    • Certificate renewal and automation.
    Let's Encrypt - SSL Certificates
    + Reverse Proxy & Load Balancing
    5 lectures 26:11

    An overview of some changes to the lessons' format and tools used to test reverse proxying and load balancing.


    Learn to implement reverse proxying in NGINX as a feature in of itself rather than only to support a backend.

    Reverse Proxy

    An introduction to understanding the basic concept of load balancing and a default round-robin implementation of NGINX as a load balancer.

    Load Balancer

    Learn to customise an NGINX load balancer by means of ip hashing or connection-based load balancing.

    Load Balancer Options

    See where to find the best Nginx resources, references and further learning. Also covers the standard Nginx documentation structure.

    Documentation & Resources
    + Outro
    1 lecture 00:50

    An outro consisting of:

    • Expected course updates & additions

    • Course Feedback & Suggestions

    • Links to more Courses

    Bonus Lecture: Feedback & Courses
    + Archive
    3 lectures 13:14

    Learn to add a custom NGINX install as an init service, for easier process management.

    NOTE: Lesson deprecated in favour of systemd services

    Adding an NGINX Init Service

    Set up geo location data on the server. This video teaches how to:

    • Install the Maxmind geoip libraries
    • Configure Nginx to look up geo location data using the GeoIP module
    • Retrieve geo data using the module variables.

    NOTE: The referenced Geo Data is no longer free. This lesson has therefore been deprecated, but remains here for reference.


    Looks at configuring the MP4 module for Nginx. This includes setting streaming limits and using pseudo streaming.

    Old Lesson: Archived for Reference Only

    Video streaming