Exercise 1: Performance Tuning

  1. Optimize worker processes for your system
  2. Tune buffer sizes
  3. Configure keepalive connections
  4. Enable file caching
  5. Optimize compression settings
  6. Benchmark before and after optimizations

Exercise 2: Security Hardening

  1. Hide NGINX version information
  2. Implement comprehensive security headers
  3. Set up rate limiting for different endpoints
  4. Configure IP-based access control
  5. Set up HTTP basic authentication
  6. Implement protection against common attacks
  7. Audit your configuration

Exercise 3: Troubleshooting

  1. Enable debug logging
  2. Create a troubleshooting checklist
  3. Practice fixing common errors (502, 504, 403, 404)
  4. Analyze access and error logs
  5. Use debugging tools (curl, netstat, etc.)
  6. Create custom error pages

Exercise 4: Advanced Rate Limiting

  1. Set up multiple rate limit zones
  2. Configure connection limiting
  3. Implement IP whitelisting
  4. Create custom error responses for rate limits
  5. Monitor rate limit effectiveness
  6. Test rate limits under load

Exercise 5: Advanced Caching

  1. Set up cache segmentation (static, dynamic, API)
  2. Implement cache purging
  3. Configure cache revalidation
  4. Enable cache locking
  5. Create cache warming scripts
  6. Monitor cache performance

Exercise 6: HTTP/2 Configuration

  1. Enable HTTP/2 on your server
  2. Test HTTP/2 connection
  3. Configure HTTP/2 server push
  4. Optimize HTTP/2 settings
  5. Compare performance with HTTP/1.1
  6. Troubleshoot HTTP/2 issues

Exercise 7: Monitoring Setup

  1. Set up NGINX status endpoint
  2. Configure comprehensive logging
  3. Set up log rotation
  4. Create custom metrics
  5. Set up monitoring alerts
  6. Build a monitoring dashboard

Exercise 8: Complete Production Setup

  1. Set up a complete production-ready configuration with: - HTTPS with strong SSL - Reverse proxy with load balancing - Advanced caching - Security hardening - Rate limiting - Performance optimization - Monitoring
  2. Document your configuration
  3. Test all functionality
  4. Create backup and recovery procedures