Book Image

NGINX Cookbook

By : Tim Butler
Book Image

NGINX Cookbook

By: Tim Butler

Overview of this book

NGINX Cookbook covers the basics of configuring NGINX as a web server for use with common web frameworks such as WordPress and Ruby on Rails, through to utilization as a reverse proxy. Designed as a go-to reference guide, this book will give you practical answers based on real-world deployments to get you up and running quickly. Recipes have also been provided for multiple SSL configurations, different logging scenarios, practical rewrites, and multiple load balancing scenarios. Advanced topics include covering bandwidth management, Docker container usage, performance tuning, OpenResty, and the NGINX Plus commercial features. By the time you've read this book, you will be able to adapt and use a wide variety of NGINX implementations to solve any problems you have.
Table of Contents (14 chapters)

What this book covers

Chapter 1, Let's Get Started, goes through some of the basics of NGINX as a refresher. It's aimed as an entry point so that there's no assumed knowledge when we move onto some of the more complex structures.

Chapter 2, Common PHP Scenarios, covers examples of the more common PHP scenarios and how to implement them with NGINX. The readers will learn how to configure NGINX and how to deploy a basic site.

Chapter 3, Common Frameworks, covers non-PHP-based frameworks. It will help the readers to understand and implement all of the common non-PHP-based platforms via NGINX.

Chapter 4, All About SSLs, covers installing the various SSL certificates via NGINX and also covers the configuration required to tweak it for certain scenarios.

Chapter 5, Logging, explains that monitoring for errors and access patterns are fundamental to running a server.

Chapter 6, Rewrites, covers how rewrites work and also specific implementations of many of the common scenarios. It will be full of specific, practical examples based on real-world scenarios.

Chapter 7, Reverse Proxy, covers a basic proxy with specific examples of caching and content expiry. This chapter will explain how to configure NGINX as a reverse proxy, content caching, monitoring cache status, microcaching, and many more important scenarios.

Chapter 8, Load Balancing, talks about the load balancing components of NGINX and how to implement them for specific scenarios. In this chapter, you will learn the three important load balancing techniques—round-robin, least connection, and hash-based load balancing.

Chapter 9, Advanced Features, covers some of the lesser used features of NGINX, why they're available, and then how to implement them. This chapter includes authentication, WebDAV, bandwidth management, connection limiting, and header modification with NGINX.

Chapter 10, Docker Containers, runs you through real-world scenarios of using NGINX within a container. It will provide basic Dockerfile configs for common scenarios.

Chapter 11, Performance Tuning, is designed to build upon the existing NGINX configurations and enable specific performance enhancements.

Chapter 12, OpenResty, introduces the concept of OpenResty, a combination of NGINX, Lua scripting, and several additional third-party modules all packaged up ready to use.

Chapter 13, NGINX Plus – The Commercial Offering, shows the readers what features are in the Plus version, as well as how to implement them.