Optimizing nginx and PHP-FPM – from Beginner to Expert to Crazy | Arne Blankerts

Optimize your nginx and PHP-FPM setup for maximum performance and scalability, from beginner to expert and beyond, with expert Arne Blankerts' tips and tricks.

Key takeaways
  • Always gzip everything
  • Use upstream pools to loadbalance and make decisions
  • Disallow all other crap and just say it doesn’t have side effects
  • Make sure to tell Nginx to use the correct root and try files
  • Use Lua to add extra functionality
  • Disable the force HTTPS redirect
  • Configure Nginx to serve static assets and compress content
  • Use named locations to make configuration more readable
  • Add error pages and report the results
  • Use FPM to handle PHP requests and optimize configuration
  • Set up load balancing and scaling
  • Use Redis to store session data
  • Configure opcache and PHP variables
  • Add logging and monitoring to track performance
  • Use JavaScript to add extra functionality to Nginx
  • Set up caching and compression
  • Use maps to make configuration more readable
  • Configure Nginx to serve files from a specific directory
  • Add additional functionality using Lua
  • Use FPM to handle large file uploads
  • Configure Nginx to serve files with a specific MIME type
  • Use maps to make configuration more readable
  • Add logging and monitoring to track performance
  • Configure Nginx to serve files with a specific extension
  • Use Lua to add extra functionality to Nginx