售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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. The Rewrite Rule Guide
Introducing the rewrite module
Creating new rewrite rules
Translating from Apache
Rule #1 – Replacing directory and file existence checks with try_files
Rule #2 – Replacing matches against REQUEST_URI with a location
Rule #3 – Replacing matches against HTTP_HOST with a server
Rule #4 – Replacing RewriteCond with if for variable checks
Summary
C. The NGINX Community
NGINX Plus
Mailing list
IRC channel
Web resources
Writing a good bug report
Summary
D. Persisting Solaris Network Tunings
Index
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜