What this book covers
Chapter 1, Downloading and Installing NGINX, is an introduction to acquiring and configuring NGINX on your system. It covers the essentials, from the initial download to ensuring NGINX persists across reboots by installing it as a system service. Key areas include preparing your system, configuring NGINX, managing dynamically loaded modules, and integrating NGINX as a reliable system service. The chapter closes with an overview of NGINX Plus.
Chapter 2, Basic NGINX Configuration, explores the essentials of NGINX configuration, from file syntax and structure to testing changes. Highlights include configuration syntax, base directives, and server testing strategies.
Chapter 3, Exploring the HTTP Configuration, focuses on the intricacies of the NGINX HTTP module, providing a comprehensive guide to directives and an in-depth exploration of the Location block. From the fundamentals of the HTTP Core module, through in-depth discussions of directives and variables, to mastery of the Location block, this chapter provides readers with the know-how to efficiently configure virtual hosts and understand the principles underlying NGINX’s configuration structure.
Chapter 4, Exploring Module Configuration in NGINX, delivers an in-depth guide to NGINX’s Rewrite module and a comprehensive overview of the open source edition’s first-party modules. This chapter focuses on mastering “pretty URLs” with the Rewrite module, and exploring NGINX’s vast selection of add-on modules.
Chapter 5, PHP and Python with NGINX, emphasizes configuring NGINX to work with dynamic PHP and Python scripts via FastCGI. Starting with a deep dive into the principles of FastCGI, it then walks through the process of configuring NGINX for efficient communication with PHP and Python applications, offering insights into using the FastCGI module for optimal server-side script integration.
Chapter 6, NGINX as a Reverse Proxy, discusses NGINX’s reverse proxy capabilities and dives into the details of the NGINX proxy module. Readers will learn how to navigate the proxy module, appreciate NGINX’s strengths in managing modern web applications, and set up a reverse proxy configuration efficiently.
Chapter 7, Introduction to Load Balancing and Optimization, focuses on deploying NGINX to manage high-traffic websites on multiple servers. This chapter looks at NGINX’s advanced load-balancing capabilities and the latest I/O optimization features, including the use of thread pools. It offers a comprehensive guide to setting up a balanced server architecture and improving I/O performance, crucial for the scalability and efficiency of large-scale web applications.
Chapter 8, NGINX within a Cloud Infrastructure, highlights the integration of NGINX and Docker in cloud setups, from Docker fundamentals to deploying NGINX with Docker Compose. Learn to optimize containerized applications and caching with NGINX as a central gateway.
Chapter 9, Fully Deploy, Manage, and Auto-Update NGINX with Ansible, explores efficient NGINX deployment across multiple servers using Ansible. Covering mass deployment strategies, the basics of configuration management, and crafting Ansible roles for NGINX, this chapter will help with large-scale server management. It concludes with automating NGINX updates for effortless maintenance to deliver a robust and secure NGINX fleet.
Chapter 10, Case Studies, dives into the deployment of secure websites and applications with detailed case studies. Master SSL with acme.sh, adopt HTTP/2, configure WordPress and integrate NextCloud with Docker. Gain skills in deploying secure sites, configuring NGINX for various scenarios and using NGINX to enhance Docker environments.
Chapter 11, Troubleshooting, navigates through NGINX debugging with essential tips and tools for identifying issues. Covering general troubleshooting advice, log parsing, and common challenges such as install errors and 403 Forbidden pages, this chapter lays out a clear path to resolving configuration mistakes and understanding block priorities. Learn to adjust configurations for effective debugging and recognize frequent NGINX configuration errors.