Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Nginx HTTP Server

You're reading from   Nginx HTTP Server Harness the power of Nginx to make the most of your infrastructure and serve pages faster than ever before

Arrow left icon
Product type Paperback
Published in Feb 2018
Publisher Packt
ISBN-13 9781788623551
Length 348 pages
Edition 4th Edition
Languages
Tools
Concepts
Arrow right icon
Authors (2):
Arrow left icon
 Fjordvald Fjordvald
Author Profile Icon Fjordvald
Fjordvald
 Nedelcu Nedelcu
Author Profile Icon Nedelcu
Nedelcu
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Title Page
Dedication
Packt Upsell
Contributors
Preface
1. Downloading and Installing Nginx FREE CHAPTER 2. Basic Nginx Configuration 3. HTTP Configuration 4. Module Configuration 5. PHP and Python with Nginx 6. Nginx as an Application Server 7. Apache and Nginx Together 8. From Apache to Nginx 9. Introduction to Load Balancing and Optimization 10. Case Studies 11. Troubleshooting 1. Other Books You May Enjoy Index

Index

A

  • advanced language rules
    • about / Advanced language rules, Directives accept specific syntaxes
    • diminutives in directive values / Diminutives in directive values
    • variables / Variables
    • string values / String values
  • AIO / AIO, Sendfile, and DirectIO
  • AJAX (Asynchronous JavaScript and XML) / Truncated or invalid FastCGI responses
  • Apache
    • benefits / How Nginx and Apache benefit from each other
    • configuring / Configuring Apache and Nginx, Configuration overview
    • reconfiguring / Reconfiguring Apache
    • port number, resetting / Resetting the port number
    • local requests, accepting / Accepting local requests only
    • versus Nginx / Nginx versus Apache
    • features / Features, Core and functioning
    • functionality / General functionality
    • flexibility / Flexibility and community
  • autobench
    • about / Autobench
    • reference / Autobench

B

  • 400 Bad Request / 400 Bad Request
  • balancing / Introduction to load balancing
  • base module directives
    • about / Base module directives, What are base modules?
    • Nginx process architecture / Nginx process architecture
    • core module directives / Core module directives
    • events module / Events module
    • configuration module / Configuration module
    • necessary adjustments / Necessary adjustments
  • build configuration issues
    • about / Build configuration issues
    • prerequisites installation, checking / Make sure you installed the prerequisites
    • directories exist / Directories exist and are writable
    • compiling / Compiling and installing
    • installing / Compiling and installing
  • BuiltWith.com trends
    • reference / Deploying a WordPress site

C

  • Certificate Authority (CA) / Obtaining your SSL certificate
  • client requests
    • keepalive_requests / keepalive_requests
    • keepalive_timeout / keepalive_timeout
    • keepalive_disable / keepalive_disable
    • send_timeout / send_timeout
    • client_body_in_file_only / client_body_in_file_only
    • client_body_in_single_buffer / client_body_in_single_buffer
    • client_body_buffer_size / client_body_buffer_size
    • client_body_temp_path / client_body_temp_path
    • client_body_timeout / client_body_timeout
    • client_header_buffer_size / client_header_buffer_size
    • client_header_timeout / client_header_timeout
    • client_max_body_size / client_max_body_size
    • large_client_header_buffers / large_client_header_buffers
    • lingering_time / lingering_time
    • lingering_timeout / lingering_timeout
    • lingering_close / lingering_close
    • ignore_invalid_headers / ignore_invalid_headers
    • chunked_transfer_encoding / chunked_transfer_encoding
    • max_ranges / max_ranges
  • Common Gateway Interface (CGI) / Common Gateway Interface
  • communications, securing with HTTPS
    • self-signed certificates, using / Self-signed certificates and certificate authorities
    • certificate authorities / Self-signed certificates and certificate authorities
    • SSL certificates, obtaining / Obtaining your SSL certificate
  • conditional structure / Conditional structure
  • configuration examples
    • about / Configuration examples
    • prefix switch / About the prefix switch
    • HTTPS servers / Regular HTTP and HTTPS servers
    • regular HTTP / Regular HTTP and HTTPS servers
    • all modules enabled / All modules enabled
    • mail server proxy / Mail server proxy
  • configuration file
    • syntax / Configuration file syntax
    • directives / Configuration directives
    • organizations / Organization and inclusions
    • inclusions / Organization and inclusions
    • directive blocks / Directive blocks
    • advanced language rules / Advanced language rules
  • configure options
    • about / Configure options
    • easy way / The easy way
  • CRL (Certificate Revocation List) / SSL, SSL-related directives

D

  • development version / Version branches
  • DirectIO / AIO, Sendfile, and DirectIO
  • directive blocks / Directive blocks
  • directives
    • about / Other directives
    • log_not_found / log_not_found
    • log_subrequest / log_subrequest
    • merge_slashes / merge_slashes
    • msie_padding / msie_padding
    • msie_refresh / msie_refresh
    • resolver / resolver
    • resolver_timeout / resolver_timeout
    • server_tokens / server_tokens
    • underscores_in_headers / underscores_in_headers
    • variables_hash_max_size / variables_hash_max_size
    • variables_hash_bucket_size / variables_hash_bucket_size
    • post_action / post_action
  • Django
    • about / Django
    • URL / Django
    • setting up / Setting up Python and Django
    • installing / Django
  • DNS load balancing / Understanding the concept of load balancing
  • dynamic files / Enabling proxy options

F

  • 403 forbidden custom error page / The 403 forbidden custom error page
  • FastCGI architecture / The reverse proxy mechanism
  • Fast Common Gateway Interface (FastCGI)
    • about / Introduction to FastCGI, Fast Common Gateway Interface (FastCGI)
    • CGI mechanism / Understanding the CGI mechanism
    • Common Gateway Interface / Common Gateway Interface
    • uWSGI / uWSGI and SCGI
    • SCGI / uWSGI and SCGI
    • directives / Main directives
    • caching / FastCGI caching and buffering
    • buffering / FastCGI caching and buffering
  • file processing and caching
    • disable_symlinks / disable_symlinks
    • directio / directio
    • directio_alignment / directio_alignment
    • open_file_cache / open_file_cache
    • open_file_cache_errors / open_file_cache_errors
    • open_file_cache_min_uses / open_file_cache_min_uses
    • open_file_cache_valid / open_file_cache_valid
    • read_ahead / read_ahead

G

  • GNU Compiler Collection (GCC) / GNU Compiler Collection
  • GoAccess
    • reference / Installing a log parser
  • Google-perftools
    • URL / Google-perftools

H

  • HTTP/2
    • using / Using HTTP/2
    • module directives / Module directives
    • module variables /  Module variables
  • HTTP/2 protocol
    • setting up / Setting up and testing HTTP/2
    • testing / Setting up and testing HTTP/2
  • HTTP core module
    • about / HTTP core module
    • structure blocks / Structure blocks
  • httperf
    • reference / Httperf
  • HTTPS
    • used, for securing communications / Securing communications with HTTPS

I

  • If block issues
    • about / If block issues
    • inefficient statements / Inefficient statements
    • unexpected behavior / Unexpected behavior
  • init script
    • about / About init scripts
    • for Debian-based distributions / Init script for older Debian-based distributions
    • for Red Hat-based distributions / Init script for SystemD-based distributions
    • installing / Installing the script
    • Debian-based distributions / Debian-based distributions
    • Red Hat-based distributions / Red Hat-based distributions
  • internal requests
    • about / Internal requests
    • internal redirects / Internal requests
    • sub-requests / Internal requests
    • error_page / error_page
    • rewrite / Rewrite
    • infinite loops / Infinite loops
    • server side includes / Server Side Includes
  • Internet Society (ISOC) / Common Gateway Interface
  • IO mechanisms / Thread pools and IO mechanisms

J

  • Just-In-Time (JIT) / Core module directives

L

  • limits and restrictions
    • about / Limits and restrictions
    • limit_except / limit_except
    • limit_rate / limit_rate
    • limit_rate_after / limit_rate_after
    • satisfy / satisfy
    • internal / internal
  • load balancing
    • about / Understanding the concept of load balancing
    • session affinity / Session affinity
    • upstream module / The upstream module
    • request distribution mechanisms / Request distribution mechanisms
  • location block
    • about / The location block
    • location modifier / Location modifier
    • search order / Search order and priority
    • priority / Search order and priority
    • scenarios / Case 1
  • location block priorities / Location block priorities
  • location modifier
    • about / Location modifier
    • = modifier / The = modifier
    • no modifier / No modifier
    • ~ modifier / The ~ modifier
    • ~* modifier / The ~* modifier
    • ^~ modifier / The ^~ modifier
    • @ modifier / The @ modifier
  • log parser
    • installing / Installing a log parser

M

  • main block / Directive blocks
  • metacharacters / PCRE syntax
  • microservices / Nginx and microservices
  • Microsoft Internet Explorer (MSIE) / msie_padding
  • MIME types
    • about / MIME types
    • types / types
    • default_type / default_type
    • types_hash_max_size / types_hash_max_size
    • types_hash_bucket_size / types_hash_bucket_size
  • miscellaneous options / Miscellaneous options
  • module
    • rewriting / Rewrite module
    • regular expressions / Reminder on regular expressions
    • internal requests / Internal requests
    • conditional structure / Conditional structure
    • directives / Directives
    • rewrite rules / Common rewrite rules
    • limits / Limits and restrictions
    • restrictions / Limits and restrictions
    • auth_basic module / Auth_basic module
    • access / Access
    • connections, limiting / Limit connections
    • request, limit / Limit request
    • auth request / Auth request
    • content / Content and encoding
    • encoding / Content and encoding
    • MP4 / FLV and MP4
    • FLV / FLV and MP4
    • HTTP headers / HTTP headers
    • addition / Addition
    • substitution / Substitution
    • gzip filter / Gzip filter
    • gzip static / Gzip static
    • gunzip filter / Gunzip filter
    • charset filter / Charset filter
    • memcached / Memcached
    • image filter / Image filter
    • XSLT / XSLT
    • split clients / Split clients
    • SSL / SSL and security
    • security / SSL and security
    • Stub status / Stub status
    • degradation / Degradation
    • Google-perftools / Google-perftools
    • WebDAV / WebDAV
    • third-party modules / Third-party modules
  • module directives
    • about / Module directives
    • socket and host configuration / Socket and host configuration
    • listen / listen
    • server_name / server_name
    • server_name_in_redirect / server_name_in_redirect
    • server_names_hash_max_size / server_names_hash_max_size
    • server_names_hash_bucket_size / server_names_hash_bucket_size
    • port_in_redirect / port_in_redirect
    • absolute_redirect / absolute_redirect
    • tcp_nodelay / tcp_nodelay
    • tcp_nopush / tcp_nopush
    • sendfile / sendfile
    • sendfile_max_chunk / sendfile_max_chunk
    • send_lowat / send_lowat
    • reset_timedout_connection / reset_timedout_connection
    • paths and documents / Paths and documents
    • client requests / Client requests
    • MIME types / MIME types
    • limits and restrictions / Limits and restrictions
    • file processing and caching / File processing and caching
  • module directives, HTTP/2
    • http2_chunk_size / http2_chunk_size
    • http2_body_preread_size / http2_body_preread_size
    • http2_idle_timeout / http2_idle_timeout
    • http2_max_concurrent_streams / http2_max_concurrent_streams
    • http2_max_field_size / http2_max_field_size
    • http2_max_header_size / http2_max_header_size
    • http2_max_requests / http2_max_requests
    • http2_recv_buffer_size / http2_recv_buffer_size
    • http2_recv_timeout / http2_recv_timeout
  • module options
    • about / Module options
    • modules enabled by default / Modules enabled by default
    • modules disabled by default / Modules disabled by default
  • modules
    • about / Additional modules
    • website access / Website access and logging
    • logging / Website access and logging
    • index / Index
    • autoindex / Autoindex
    • random index / Random index
    • log / Log
    • empty GIF / Empty GIF
  • module variables
    • about / Module variables
    • request headers / Request headers
    • response headers / Response headers
    • Nginx generated / Nginx generated

N

  • nginScript
    • about / nginScript
    • supported features / Supported features
    • not supported features / Unsupported features
    • main directives / Main directives
    • handler example / Handler example
  • Nginx
    • installing, via package managers / Installing via package managers
    • provided packages /
    • compiling, from source / Compiling from source
    • downloading / Downloading Nginx, Downloading and extracting
    • websites and resources / Websites and resources
    • reference / Websites and resources, Features, Using Nginx as a TCP load balancer
    • version branches / Version branches
    • features / Features, Features, Core and functioning
    • extracting / Downloading and extracting
    • adding, as system service / Adding Nginx as a system service
    • about / Python and Nginx, Nginx and microservices
    • configuration / Nginx configuration
    • benefits / How Nginx and Apache benefit from each other
    • example / An example case
    • configuring / Configuring Apache and Nginx, Configuring Nginx, Advanced configuration
    • proxy options, enabling / Enabling proxy options
    • content, separating / Separating content
    • versus Apache / Nginx versus Apache
    • functionality / General functionality
    • flexibility / Flexibility and community
    • using, as TCP load balancer / Using Nginx as a TCP load balancer
    • installation issues / Install issues
  • Nginx, used as TCP load balancer
    • stream module / The stream module
    • MySQL load balancing, example / An example of MySQL load balancing
  • Nginx configuration
    • HTTP block, using / HTTP block
    • server block / Server block
    • location block / Location blocks
    • HTTPS, enabling / Enabling HTTPS in your Nginx configuration
  • Nginx master process / User and group
  • Nginx Plus
    • about / Nginx Plus
    • reference / Nginx Plus
  • Nginx proxy module
    • about / Nginx proxy module
    • main directives / Main directives
    • temporary files / Caching, buffering, and temporary files
    • caching / Caching, buffering, and temporary files
    • buffering / Caching, buffering, and temporary files
    • limits / Limits, timeouts, and errors
    • errors / Limits, timeouts, and errors
    • timeouts / Limits, timeouts, and errors
    • SSL related directives / SSL-related directives
    • other directives / Other directives
    • variables / Variables
  • Nginx service
    • controlling / Controlling the Nginx service
    • daemons / Daemons and services
    • user / User and group
    • group / User and group
    • command-line switches / Nginx command-line switches
    • daemon, starting / Starting and stopping the daemon
    • daemon, stopping / Starting and stopping the daemon
    • configuration, testing / Testing the configuration
    • switches / Other switches
  • Nginx troubleshooting
    • tips / General tips on Nginx troubleshooting
    • access permissions, checking / Checking access permissions
    • configuration, testing / Testing your configuration
    • service, reloading / Have you reloaded the service?
    • logs, checking / Checking logs
  • Nginx Unit
    • about / Nginx Unit
    • reference / Nginx Unit
  • Nginx worker processes / User and group

O

  • OCSP (Online Certificate Status Protocol) / SSL stapling
  • OpenSSL / OpenSSL
  • OpenWebLoad
    • about / OpenWebLoad
    • reference / OpenWebLoad
  • ownCloud drive
    • creating / Creating your ownCloud drive
    • obtaining / Getting ownCloud
    • Nginx configuration / Nginx configuration
    • self-signed certificate, setting up / Setting up a self-signed certificate

P

  • path options / Path options
  • paths and documents
    • about / Paths and documents
    • root / root
    • alias / alias
    • error_page / error_page
    • if_modified_since / if_modified_since
    • index / index
    • recursive_error_pages / recursive_error_pages
    • try_files / try_files
  • performance tests
    • about / Performance tests
    • httperf / Httperf
    • autobench / Autobench
    • OpenWebLoad / OpenWebLoad
  • Perl Compatible Regular Expression (PCRE) / The PCRE library, PCRE syntax
  • PHP
    • working, with Nginx / PHP with Nginx
    • architecture / Architecture
    • PHP-FPM / PHP-FPM
    • setting up / Setting up PHP and PHP-FPM
    • PHP-FPM, setting up / Setting up PHP and PHP-FPM
    • downloading / Downloading and extracting
    • extracting / Downloading and extracting
    • requisites / Requirements
    • building / Building PHP
    • post-install configuration / Post-install configuration
    • executing / Running and controlling
    • controlling / Running and controlling
    • Nginx, configuration / Nginx configuration
  • PHP-FPM / Architecture
  • prerequisite options / Prerequisite options
  • Python
    • about / Python and Nginx
    • Django / Django
    • setting up / Setting up Python and Django, Python
    • FastCGI process manager / Starting the FastCGI process manager

R

  • regexes / Reminder on regular expressions
  • regexps / Reminder on regular expressions
  • regular expressions
    • about / Reminder on regular expressions
    • purpose / Purpose
    • PCRE syntax / PCRE syntax
    • quantifiers / Quantifiers
    • captures / Captures
  • request distribution mechanisms / Request distribution mechanisms
  • reverse proxy architecture
    • improving / Improving the reverse proxy architecture
    • IP address, forwarding / Forwarding the correct IP address
    • SSL issues / SSL issues and solutions
    • SSL solutions / SSL issues and solutions
    • server control panel issues / Server control panel issues
  • reverse proxy mechanism / The reverse proxy mechanism
  • rewrite rules, module
    • search, performing / Performing a search
    • user profile page / User profile page
    • multiple parameters / Multiple parameters
    • Wikipedia / Wikipedia-like
    • website article / News website article
    • discussion board / Discussion board

S

  • Search Engine Optimization (SEO) / Rewrite module
  • Sendfile / AIO, Sendfile, and DirectIO
  • server
    • testing / Testing your server
    • performance tests / Performance tests
    • Nginx, upgrading / Upgrading Nginx gracefully
  • Server Side Include (SSI) / Server Side Includes, Nginx and microservices
  • session affinity / Session affinity
  • Simple Common Gateway Interface (SCGI) / uWSGI and SCGI
  • SPeeDY module / Using HTTP/2
  • split clients / Split clients
  • SSI module
    • about / SSI module
    • module directives / Module directives and variables
    • variables / Module directives and variables
    • commands / SSI commands
    • file includes / File includes
    • variables, working with / Working with variables
    • conditional structure / Conditional structure
    • configuration / Configuration
  • SSL module
    • directives / SSL
    • SSL certificate, setting up / Setting up an SSL certificate
    • stapling / SSL stapling
    • secure link / Secure link
  • static files / Enabling proxy options
  • strftime
    • URL / Configuration
  • System V scripts / System V scripts

T

  • test server
    • creating / Creating a test server
  • thread pools / Thread pools and IO mechanisms, Relieving worker processes
  • truncated (invalid) FastCGI responses / Truncated or invalid FastCGI responses

U

  • upstream module / The upstream module

V

  • version branches
    • mainline version / Version branches
    • stable version / Version branches
    • legacy version / Version branches
  • virtual hosts / Organization and inclusions
  • visitors
    • about / About your visitors
    • browser / Browser
    • map / Map
    • geo / Geo
    • GeoIP / GeoIP
    • UserID filter / UserID filter
    • referer / Referer
    • IP / Real IP

W

  • WebDAV / WebDAV
  • Web Server Gateway Interface (WSGI)
    • URL / uWSGI and SCGI
  • wiki
    • reference / Websites and resources
  • WordPress
    • deploying / Deploying a WordPress site
    • server, preparing / Preparing your server and obtaining WordPress
    • system requirements / System requirements
    • PHP configuration / PHP configuration
    • MySQL configuration / MySQL configuration
    • extracting / Downloading and extracting WordPress
    • downloading / Downloading and extracting WordPress
    • Nginx configuration / Nginx configuration
    • configuration / WordPress configuration
  • worker processes
    • relieving / Relieving worker processes
  • World Wide Web (WWW) / Websites and resources

Z

  • zlib library / The zlib library
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images