Course Code: httpngx
Duration: 21 hours
Prerequisites:

Participants must be comfortable with a Linux command line and have a working knowledge of TCP/IP

Overview:

This course is intended for system administrators who want to be able to configure and monitor web servers. It both focuses on general theory behind HTTP and, on the practical side, showcases a specific high-performance web server, Nginx.

Course Outline:
  1. HTTP/1.x protocol
    1. Request and response format
    2. Inspecting HTTP conversations with tcpdump and Wireshark
    3. Inspecting HTTP headers in a web browser
    4. Making requests with CURL
    5. Common headers
    6. Request pipelining
    7. Content length and chunked encoding
    8. MIME types
  2. Nginx installation
    1. Installing nginx from Debian packages
    2. Variants of nginx available in Debian and Ubuntu
    3. Installing nginx from source
    4. Starting nginx
    5. Upgrading nginx
  3. Nginx as a static file server
    1. General structure of the configuration file
    2. Setting up virtual hosts
    3. Configuring locations
    4. Location lookup order
    5. Setting up error pages
    6. Issuing redirects
    7. Other forms of URL rewriting
    8. Serving an empty GIF image
    9. Internal and named locations
    10. Overriding MIME types
  4. Client-side performance optimization
    1. Allowing clients to cache resources
    2. The Vary: header
    3. Minimizing the number of requests
    4. Keep-alives
    5. What if a resource needs to change
    6. How web frameworks deal with static files
  5. Content post-processing
    1. Gzip compression
    2. Image scaling
  6. Access control
    1. Restricting access to files based on IP address
    2. Geographical restrictions
    3. Hiding VCS directories and private files
    4. Basic authentication
    5. Other types of authentication
    6. Combining restrictions
    7. Secure links
  7. Applying limits
    1. Traffic shaping
    2. Grouping requests for the purpose of limiting
    3. Rate-limiting requests
    4. Restricting simultaneous connections
  8. Nginx as a reverse proxy
    1. Supported upstream protocols
    2. Dealing with self-signed upstream SSL certificates
    3. Passing parameters to FastCGI and uWSGI backends
    4. Proxying websocket connections
    5. X-Accel-* headers
    6. Modifying headers received and sent by upstream
  9. Language-specific reverse proxy setups
    1. PHP
    2. Python
    3. Ruby
  10. Nginx as an SSL terminator
    1. Generating self-signed SSL certificates
    2. Obtaining certificates from Let's Encrypt
    3. Restricting available ciphers
    4. Working with session tickets
    5. Stapling OCSP responses
    6. Verifying SSL configuration
    7. Accepting client-side certificates
    8. HTTP/2 considerations
  11. Load balancing with Nginx
    1. Defining upstream groups
    2. Sticky sessions using ip_hash
    3. Extra features of Nginx Plus as a load balancer
    4. Alternatives to Nginx and Nginx Plus
    5. Putting another Nginx behind a Nginx load balancer
    6. Nginx behind HAProxy or AWS load balancer
  12. Nginx as a cache
    1. Telling nginx to cache pages
    2. How nginx reacts to standard caching-related headers
    3. Tunable parameters of caches
    4. Nginx cache vs application-level cache
    5. Clearing the cache
  13. Deploying popular web applications with Nginx
    1. The list of applications to be discussed is determined by the trainer
  14. Logging
    1. Access log and error log files
    2. Specifying custom log format
    3. Tracking slow requests
    4. Optimizing logging
    5. Log rotation
    6. Log analysis by external programs
  15. Monitoring Nginx
    1. Nginx stub status page
    2. Nginx Plus extended live status page
    3. What monitoring systems usually plot and alert about Nginx
  16. [optional] High availability with Nginx¹
    1. How to deploy the same static content to multiple servers
    2. Configuration sharing
    3. Fail-over using an elastic/virtual IP address
    4. Setting up VRRP with Keepalived
    5. Other high-availability stacks
    6. Nginx Plus integration with Keepalived
  17. Common mistakes and security issues related to Nginx configuration
  18. Common performance issues

¹ The High Availability section involves a network setup that makes intrusion detection systems unhappy, or requires setting up multiple virtual machines per participant (which no other topic needs). So, it is not provided by default.

Sites Published:

United Arab Emirates - HTTP fundamentals and Nginx web server

Qatar - HTTP fundamentals and Nginx web server

Egypt - HTTP fundamentals and Nginx web server

Saudi Arabia - HTTP fundamentals and Nginx web server

South Africa - HTTP fundamentals and Nginx web server

Brasil - HTTP fundamentals and Nginx web server

Canada - HTTP fundamentals and Nginx web server

中国 - HTTP fundamentals and Nginx web server

香港 - HTTP fundamentals and Nginx web server

澳門 - HTTP fundamentals and Nginx web server

台灣 - HTTP fundamentals and Nginx web server

USA - HTTP fundamentals and Nginx web server

Österreich - HTTP fundamentals and Nginx web server

Schweiz - HTTP fundamentals and Nginx web server

Deutschland - HTTP fundamentals and Nginx web server

Czech Republic - HTTP fundamentals and Nginx web server

Denmark - HTTP fundamentals and Nginx web server

Estonia - HTTP fundamentals and Nginx web server

Finland - HTTP fundamentals and Nginx web server

Greece - HTTP fundamentals and Nginx web server

Magyarország - HTTP fundamentals and Nginx web server

Ireland - HTTP fundamentals and Nginx web server

Luxembourg - HTTP fundamentals and Nginx web server

Latvia - HTTP fundamentals and Nginx web server

España - Fundamentos HTTP y servidor web Nginx

Italia - HTTP fundamentals and Nginx web server

Lithuania - HTTP fundamentals and Nginx web server

Nederland - HTTP fundamentals and Nginx web server

Norway - HTTP fundamentals and Nginx web server

Portugal - HTTP fundamentals and Nginx web server

România - HTTP fundamentals and Nginx web server

Sverige - HTTP fundamentals and Nginx web server

Türkiye - HTTP fundamentals and Nginx web server

Malta - HTTP fundamentals and Nginx web server

Belgique - HTTP fundamentals and Nginx web server

France - HTTP fundamentals and Nginx web server

日本 - HTTP fundamentals and Nginx web server

Australia - HTTP fundamentals and Nginx web server

Malaysia - HTTP fundamentals and Nginx web server

New Zealand - HTTP fundamentals and Nginx web server

Philippines - HTTP fundamentals and Nginx web server

Singapore - HTTP fundamentals and Nginx web server

Thailand - HTTP fundamentals and Nginx web server

Vietnam - HTTP fundamentals and Nginx web server

India - HTTP fundamentals and Nginx web server

Argentina - Fundamentos HTTP y servidor web Nginx

Chile - Fundamentos HTTP y servidor web Nginx

Costa Rica - Fundamentos HTTP y servidor web Nginx

Ecuador - Fundamentos HTTP y servidor web Nginx

Guatemala - Fundamentos HTTP y servidor web Nginx

Colombia - Fundamentos HTTP y servidor web Nginx

México - Fundamentos HTTP y servidor web Nginx

Panama - Fundamentos HTTP y servidor web Nginx

Peru - Fundamentos HTTP y servidor web Nginx

Uruguay - Fundamentos HTTP y servidor web Nginx

Venezuela - Fundamentos HTTP y servidor web Nginx

Polska - HTTP fundamentals and Nginx web server

United Kingdom - HTTP fundamentals and Nginx web server

South Korea - HTTP fundamentals and Nginx web server

Pakistan - HTTP fundamentals and Nginx web server

Sri Lanka - HTTP fundamentals and Nginx web server

Bulgaria - HTTP fundamentals and Nginx web server

Bolivia - Fundamentos HTTP y servidor web Nginx

Indonesia - HTTP fundamentals and Nginx web server

Kazakhstan - HTTP fundamentals and Nginx web server

Moldova - HTTP fundamentals and Nginx web server

Morocco - HTTP fundamentals and Nginx web server

Tunisia - HTTP fundamentals and Nginx web server

Kuwait - HTTP fundamentals and Nginx web server

Oman - HTTP fundamentals and Nginx web server

Slovakia - HTTP fundamentals and Nginx web server

Kenya - HTTP fundamentals and Nginx web server

Nigeria - HTTP fundamentals and Nginx web server

Botswana - HTTP fundamentals and Nginx web server

Slovenia - HTTP fundamentals and Nginx web server

Croatia - HTTP fundamentals and Nginx web server

Serbia - HTTP fundamentals and Nginx web server

Bhutan - HTTP fundamentals and Nginx web server

Nepal - HTTP fundamentals and Nginx web server

Uzbekistan - HTTP fundamentals and Nginx web server