Mastering NGINX - Second Edition
eBook - ePub

Mastering NGINX - Second Edition

Dimitri Aivaliotis

Partager le livre
  1. 320 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Mastering NGINX - Second Edition

Dimitri Aivaliotis

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

An in-depth guide to configuring NGINX for your everyday server needsAbout This Book‱ Get tips, tricks, and master insight to help you configure NGINX for any server situation‱ Integrate NGINX into your applications architecture with is, using hands-on guidance and practical code samples that are free to use‱ Troubleshoot configuration problems before and as they arise, for a seamless NGINX server experienceWho This Book Is ForThis book is for system administrators and engineers who want to personalize NGINX, and design a robust configuration module to solve their hosting problems. Some knowledge of NGINX is a plus, but is not a prerequisite.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 configurationsIn DetailNGINX 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.Style and approachThis is a mastering guide where you will follow an instructional, conversational approach working through problems and their solutions.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Mastering NGINX - Second Edition est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Mastering NGINX - Second Edition par Dimitri Aivaliotis en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Ciencia de la computaciĂłn et Desarrollo web. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2016
ISBN
9781785283765

Mastering NGINX - Second Edition


Table of Contents

Mastering NGINX - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Installing NGINX and Third-Party Modules
Installing NGINX using a package manager
Installing NGINX on CentOS
Installing NGINX on Debian
Installing NGINX from source
Preparing a build environment
Compiling from source
Table – Common configure options
Table – Configure options for optimization
Configuring for web or mail service
Configure options for a mail proxy
Table: Mail configure options
Configure options to specify paths
Table – HTTP configuration options
Configuring SSL support
Enabling various modules
Table – HTTP module configure options
Disabling unused modules
Table – Disable configure options
Finding and installing third-party modules
Adding support for Lua
Putting it all together
Summary
2. A Configuration Guide
The basic configuration format
NGINX global configuration parameters
Using the include files
The HTTP server section
Client directives
File I/O directives
Hash directives
Socket directives
Sample configuration
The virtual server section
Locations – where, when, and how
Full sample configuration
Summary
3. Using the mail Module
Basic proxy service
The mail server configuration section
POP3 service
IMAP service
SMTP service
Using SSL/TLS
Complete mail example
Authentication service
Combining with memcached
Interpreting log files
Operating system limits
Summary
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
Memcached upstream servers
FastCGI upstream servers
SCGI upstream servers
The uWSGI upstream servers
Load-balancing
Load-balancing algorithms
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
5. Reverse Proxy Advanced Topics
Security through separation
Encrypting traffic with SSL
Authenticating clients using SSL
Blocking traffic based on originating IP address
Isolating application components for scalability
Reverse proxy performance tuning
Buffering data
Caching data
Storing data
Compressing data
Summary
6. The NGINX HTTP Server
NGINX's architecture
The HTTP core module
The server directive
Logging in NGINX
Finding files
Name resolution
Interacting with the client
Using limits to prevent abuse
Restricting access
Streaming media files
Predefined variables
SPDY and HTTP/2
Using NGINX with PHP-FPM
An example Drupal configuration
Wiring NGINX and uWSGI together
An example Django configuration
Summary
7. NGINX for the Application Developer
Caching integration
No application caching
Caching in the database
Caching in the filesystem
Changing content on-the-fly
Using the addition module
The sub module
The xslt module
Using Server Side Includes
Decision-making in NGINX
Creating a secure link
Generating images
Tracking website visitors
Preventing inadvertent code execution
Summary
8. Integrating Lua with NGINX
The ngx_lua module
Integrating with Lua
Logging with Lua
Summary
9. Troubleshooting Techniques
Analyzing log files
The formats of the error_log file
Error log file entry examples
Configuring advanced logging
Debug logging
Switching binaries at runtime
Using access logs for debugging
Common configuration errors
Using if instead of try_files
Using if as a hostname switch
Not using the server context to best effect
Operating system limits
File descriptor limits
Network limits
Performance problems
Using the Stub Status module
Summary
A. Directive Reference
B. T...

Table des matiĂšres