Title : Nginx HTTP Server
Author(s) : Clement Nedelcu
Language : English
Nginx is a lightweight HTTP server designed for high-traffic websites, with network scalability as primary objective. With the advent of high-speed Internet access, short loading times and fast transfer rates have become a necessity. This free open-source solution will either serve as full replacement of other software such as Apache, or stand in front of your existing infrastructure to improve its overall speed. However, migrating to Nginx requires some guidance.
This book serves as a detailed guide to setting up Nginx in different production situations: as standalone server, as reverse proxy, interacting with applications via FastCGI, and more. In addition, the complete directive reference will be your best friend at all stages of the configuration and maintenance processes.
This book is the perfect companion for both Nginx beginners and experienced administrators. For the former, it will take you through the complete process of setting up this lightweight HTTP server on your system and configuring its various modules to get it to do exactly what you need, in a fast and secure way. For the latter, it provides different angles of approach that can help you make the most of your current infrastructure. As the book progresses, it provides a complete reference to all the modules and directives of Nginx. It will explain how to replace your existing server with Nginx or configure Nginx to work as a frontend for your existing server.
By the end of this book, you will be geared up to implement Nginx as a web server that will boost the speed of all your web applications.
A handy guide to setting up Nginx as a standalone web server or as a reverse proxy, with complete directive and module references
What you will learn from this book :
- Download and build Nginx from source along with its dependencies
- Learn the basics of Nginx configuration: syntax, structure, and semantics
- Create virtual host configurations effortlessly
- Discover how to enable, configure, and use all first-party modules
- Establish advanced rewrite rules with the Nginx Rewrite module
- Set up Nginx to work with PHP, Python, and more via FastCGI
- Configure Nginx to work as frontend for your existing HTTP server
- Complete the process of replacing Apache by Nginx
- Follow three practical examples on how to port your Apache rewrite rules
- Find your way through the configuration with the complete detailed directive reference
- Troubleshooting: know where to start looking if something goes wrong
There are 8 chapters and 3 appendices, listed here:
- 1. Preparing your work environment: getting ready to work under a command-line environment, with a reminder on the basic tools and commands.
- 2. Downloading and installing Nginx: downloading the source, the prerequisites, building the application, installing it and learning to solve installation issues.
- 3. Nginx core configuration: configuring the core modules and optimizing your setup for your current hardware architecture.
- 4. HTTP configuration: configuring the HTTP core module (virtual hosts, http/server/location blocks...)
- 5. Module configuration: configuring and using additional modules such as the rewrite module, SSI module and all other first-party modules.
- 6. Setting up Nginx to work with PHP and Python: learn to use the FastCGI module to set up PHP with Nginx, then Python.
- 7. Setting up Nginx as a reverse proxy: discovering the Proxy module and setting up a reverse proxied architecture with Nginx as frontend and Apache as backend.
- 8. Switching from Apache to Nginx: a complete guide to switching from Apache to Nginx, covering everything including converting Apache rewrite rules to Nginx.
- Appendix A: full directive index. A list and description of all configuration directives, sorted alphabetically. Module directives are also described in their respective chapters too.
- Appendix B: full module reference. A detailed list of all available modules.
- Appendix C: troubleshooting. Discusses the most common issues that administrators face when they configure Nginx.