Mastering NGINX - Second Edition

An in-depth guide to confi guring NGINX for your everyday server needs
Preview in Mapt
Code Files

Mastering NGINX - Second Edition

Dimitri Aivaliotis

1 customer reviews
An in-depth guide to confi guring NGINX for your everyday server needs
Mapt Subscription
FREE
$29.99/m after trial
eBook
$28.00
RRP $39.99
Save 29%
Print + eBook
$49.99
RRP $49.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$28.00
$49.99
$29.99 p/m after trial
RRP $39.99
RRP $49.99
Subscription
eBook
Print + eBook
Start 30 Day Trial

Frequently bought together


Mastering NGINX - Second Edition Book Cover
Mastering NGINX - Second Edition
$ 39.99
$ 28.00
Mastering vRealize Operations Manager - Second Edition Book Cover
Mastering vRealize Operations Manager - Second Edition
$ 39.99
$ 28.00
Buy 2 for $35.00
Save $44.98
Add to Cart

Book Details

ISBN 139781782173311
Paperback320 pages

Book Description

NGINX is a high-performance HTTP server and mail proxy designed to use very few system resources. But despite its power it is often a challenge to properly configure NGINX to meet your expectations. Mastering Nginx is the solution – an insider’s guide that will clarify the murky waters of NGINX’s configuration. Tune NGINX for various situations, improve your NGINX experience with some of the more obscure configuration directives, and discover how to design and personalize a configuration to match your needs.

To begin with, quickly brush up on installing and setting up the NGINX server on the OS and its integration with third-party modules. From here, move on to explain NGINX's mail proxy module and its authentication, and reverse proxy to solve scaling issues. Then see how to integrate NGINX with your applications to perform tasks.

The latter part of the book focuses on working through techniques to solve common web issues and the know-hows using NGINX modules. Finally, we will also explore different configurations that will help you troubleshoot NGINX server and assist with performance tuning.

Table of Contents

Chapter 1: Installing NGINX and Third-Party Modules
Installing NGINX using a package manager
Installing NGINX from source
Configuring SSL support
Enabling various modules
Finding and installing third-party modules
Adding support for Lua
Putting it all together
Summary
Chapter 2: A Configuration Guide
The basic configuration format
NGINX global configuration parameters
Using the include files
The HTTP server section
The virtual server section
Locations – where, when, and how
Full sample configuration
Summary
Chapter 3: Using the mail Module
Basic proxy service
Authentication service
Combining with memcached
Interpreting log files
Operating system limits
Summary
Chapter 4: NGINX as a Reverse Proxy
Introducing reverse proxying
The proxy module
Legacy servers with cookies
The upstream module
Keepalive connections
Types of upstream servers
Single upstream server
Multiple upstream servers
Non-HTTP upstream servers
Load-balancing
Converting an if-fy configuration to a more modern interpretation
Using error documents to handle upstream problems
Determining the client's real IP address
Summary
Chapter 5: Reverse Proxy Advanced Topics
Security through separation
Isolating application components for scalability
Reverse proxy performance tuning
Summary
Chapter 6: The NGINX HTTP Server
NGINX's architecture
The HTTP core module
Using limits to prevent abuse
Restricting access
Streaming media files
Predefined variables
SPDY and HTTP/2
Using NGINX with PHP-FPM
Wiring NGINX and uWSGI together
Summary
Chapter 7: NGINX for the Application Developer
Caching integration
Changing content on-the-fly
Using Server Side Includes
Decision-making in NGINX
Creating a secure link
Generating images
Tracking website visitors
Preventing inadvertent code execution
Summary
Chapter 8: Integrating Lua with NGINX
The ngx_lua module
Integrating with Lua
Logging with Lua
Summary
Chapter 9: Troubleshooting Techniques
Analyzing log files
Configuring advanced logging
Common configuration errors
Operating system limits
Performance problems
Using the Stub Status module
Summary

What You Will Learn

  • Compile the right third-party module to meet your needs
  • Write an authentication server to use with the mail proxy module
  • Create your own SSL certificates to encrypt connections
  • Use try_files to solve your file-existence check problems
  • Cache and compress responses to get speedier user interaction
  • Integrate popular PHP frameworks with the FastCGI module
  • Construct useful logging configurations

Authors

Table of Contents

Chapter 1: Installing NGINX and Third-Party Modules
Installing NGINX using a package manager
Installing NGINX from source
Configuring SSL support
Enabling various modules
Finding and installing third-party modules
Adding support for Lua
Putting it all together
Summary
Chapter 2: A Configuration Guide
The basic configuration format
NGINX global configuration parameters
Using the include files
The HTTP server section
The virtual server section
Locations – where, when, and how
Full sample configuration
Summary
Chapter 3: Using the mail Module
Basic proxy service
Authentication service
Combining with memcached
Interpreting log files
Operating system limits
Summary
Chapter 4: NGINX as a Reverse Proxy
Introducing reverse proxying
The proxy module
Legacy servers with cookies
The upstream module
Keepalive connections
Types of upstream servers
Single upstream server
Multiple upstream servers
Non-HTTP upstream servers
Load-balancing
Converting an if-fy configuration to a more modern interpretation
Using error documents to handle upstream problems
Determining the client's real IP address
Summary
Chapter 5: Reverse Proxy Advanced Topics
Security through separation
Isolating application components for scalability
Reverse proxy performance tuning
Summary
Chapter 6: The NGINX HTTP Server
NGINX's architecture
The HTTP core module
Using limits to prevent abuse
Restricting access
Streaming media files
Predefined variables
SPDY and HTTP/2
Using NGINX with PHP-FPM
Wiring NGINX and uWSGI together
Summary
Chapter 7: NGINX for the Application Developer
Caching integration
Changing content on-the-fly
Using Server Side Includes
Decision-making in NGINX
Creating a secure link
Generating images
Tracking website visitors
Preventing inadvertent code execution
Summary
Chapter 8: Integrating Lua with NGINX
The ngx_lua module
Integrating with Lua
Logging with Lua
Summary
Chapter 9: Troubleshooting Techniques
Analyzing log files
Configuring advanced logging
Common configuration errors
Operating system limits
Performance problems
Using the Stub Status module
Summary

Book Details

ISBN 139781782173311
Paperback320 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Nginx HTTP Server - Third Edition Book Cover
Nginx HTTP Server - Third Edition
$ 35.99
$ 25.20
Nginx Troubleshooting Book Cover
Nginx Troubleshooting
$ 23.99
$ 4.80
NGINX High Performance Book Cover
NGINX High Performance
$ 31.99
$ 22.40
Nginx Essentials Book Cover
Nginx Essentials
$ 27.99
$ 19.60
NGINX Cookbook Book Cover
NGINX Cookbook
$ 35.99
$ 25.20
Learning Ansible 2 - Second Edition Book Cover
Learning Ansible 2 - Second Edition
$ 35.99
$ 25.20