Visão Geral
O Curso NGINX é destinado a administradores de sistemas que desejam configurar e monitorar servidores web. Ele se concentra na teoria geral por trás do HTTP e, no lado prático, apresenta um servidor web específico de alto desempenho, o Nginx.
Conteúdo Programatico
HTTP protocol
- Request and response format
- Inspecting HTTP conversations with tcpdump and Wireshark
- Inspecting HTTP headers in a web browser
- Making requests with CURL
- Common headers
- Request pipelining
- Content length and chunked encoding
- MIME types
Nginx installation
- Installing nginx from Debian packages
- Variants of nginx available in Debian and Ubuntu
- Installing nginx from source
- Starting nginx
- Upgrading nginx
Nginx as a static file server
- General structure of the configuration file
- Setting up virtual hosts
- Configuring locations
- Location lookup order
- Setting up error pages
- Issuing redirects
- Other forms of URL rewriting
- Serving an empty GIF image
- Internal and named locations
- Overriding MIME types
Client-side performance optimization
- Allowing clients to cache resources
- The Vary: header
- Minimizing the number of requests
- Keep-alives
- What if a resource needs to change
- How web frameworks deal with static files
Content post-processing
- Gzip compression
- Image scaling
Access control
- Restricting access to files based on IP address
- Geographical restrictions
- Hiding VCS directories and private files
- Basic authentication
- Other types of authentication
- Combining restrictions
- Secure links
Applying limits
- Traffic shaping
- Grouping requests for the purpose of limiting
- Rate-limiting requests
- Restricting simultaneous connections
Nginx as a reverse proxy
- Supported upstream protocols
- Dealing with self-signed upstream SSL certificates
- Passing parameters to FastCGI and uWSGI backends
- Proxying websocket connections
- X-Accel-* headers
- Modifying headers received and sent by upstream
Language-specific reverse proxy setups
- PHP
- Python
- Ruby
Nginx as an SSL terminator
- Generating self-signed SSL certificates
- Obtaining certificates from Let's Encrypt
- Restricting available ciphers
- Working with session tickets
- Stapling OCSP responses
- Verifying SSL configuration
- Accepting client-side certificates
- HTTP/2 considerations
Load balancing with Nginx
- Defining upstream groups
- Sticky sessions using ip_hash
- Extra features of Nginx Plus as a load balancer
- Alternatives to Nginx and Nginx Plus
- Putting another Nginx behind a Nginx load balancer
- Nginx behind HAProxy or AWS load balancer
Nginx as a cache
- Telling nginx to cache pages
- How nginx reacts to standard caching-related headers
- Tunable parameters of caches
- Nginx cache vs application-level cache
- Clearing the cache
Deploying popular web applications with Nginx
- The list of applications to be discussed is determined by the trainer
Logging
- Access log and error log files
- Specifying custom log format
- Tracking slow requests
- Optimizing logging
- Log rotation
- Log analysis by external programs
Monitoring Nginx
- Nginx stub status page
- Nginx Plus extended live status page
- What monitoring systems usually plot and alert about Nginx
High availability with Nginx
- How to deploy the same static content to multiple servers
- Configuration sharing
- Fail-over using an elastic/virtual IP address
- Setting up VRRP with Keepalived
- Other high-availability stacks
- Nginx Plus integration with Keepalived
Common mistakes and security issues related to Nginx configuration
Common performance issues