Book Image

Mastering Nginx

By : Dimitri Aivaliotis
Book Image

Mastering Nginx

By: Dimitri Aivaliotis

Overview of this book

<p>NGINX is a high-performance HTTP server and mail proxy designed to use very few system resources. With the many tutorials and example configurations floating around the Web, it is difficult to know how to properly configure NGINX to meet your expectations.<br /><br />"Mastering Nginx" will serve to clarify the murky waters of NGINX configuration, helping you learn how to tune NGINX for various situations, what some of the more obscure configuration directives do, and how to design a decent configuration to match your needs.<br /><br />Beginning with an overview of compiling NGINX and describing its basic configuration file format, this guide next takes you on a tour of NGINX's modules.</p> <p>From the unique mail module to the upstream module, this book explores the various possibilities of using NGINX as a reverse proxy. The multiple HTTP modules are explained, and the book rounds off the tour with a discussion of troubleshooting.</p> <p>"Mastering Nginx" will explain all aspects of configuring NGINX to help solve your hosting problems.</p>
Table of Contents (19 chapters)
Mastering NGINX
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Persisting Solaris Network Tunings
Index

Summary


We explored NGINX's rewrite module in this appendix. There are only a few directives associated with the module, but these can be used to create some complex configurations. Taking the process of creating new rewrite rules step-by-step has hopefully demonstrated how rewrite rules can be made easily. An understanding of regular expressions, how to read and construct them, is needed before creating rewrite rules of any complexity. We rounded this appendix off by examining how to translate Apache-style rewrite rules into a configuration that NGINX can parse. In doing so, we discovered that quite a few Apache rewrite rule scenarios can be solved differently in NGINX.