{"id":34,"date":"2015-01-02T11:54:01","date_gmt":"2015-01-02T11:54:01","guid":{"rendered":"http:\/\/dracony.org\/?p=34"},"modified":"2015-01-02T17:28:27","modified_gmt":"2015-01-02T17:28:27","slug":"stop-using-php-fpm-to-argue-using-nginx-vs-apache","status":"publish","type":"post","link":"https:\/\/dracony.org\/stop-using-php-fpm-to-argue-using-nginx-vs-apache\/","title":{"rendered":"Stop using PHP-FPM to argue using Nginx vs Apache"},"content":{"rendered":"

I often see “Apache vs Nginx” discussions appearing on reddit and some of the arguments people make are plain ridiculous. So now I want to address one that makes my eyes roll the post: PHP-FPM.<\/p>\n

When Nginx first came into PHP world its popularity was mostly fueled by numerous benchmarks showcasing its speed vs a LAMP setup. You see Nginx didn’t have anything like Apaches’ mod_php<\/em> and required the use of PHP-FPM, which indeed was a much faster way of processing PHP on multicore systems<\/em>. The mistake people often did was to compare those setups and conclude that Nginx was just a better HTTP server.<\/p>\n

Nginx is a great webserver, and its default setup is designed for performance, while the default Apache setup provides much more in terms of flexibility. But please don’t say that Nginx is better just because PHP-FPM is faster than mod_php, when you can easily setup Apache to use FPM too<\/p><\/blockquote>\n

One of the contributing reasons is that there is so many different configuration options in Apache that a person can easily misconfigure it. Apache has 3 MPMs: prefork, worker and event and even proxying request to the PHP-FPM server can be done in at least 3 entirely different ways. Nginx is easier to set up if you’re looking for a “good enough” solution, it’ll run pretty good out of the box.<\/p>\n

At that time I thought people would eventually understand the actual difference and judge webservers on their own merits, but years passed and it’s still happening! So pretty much now we have 4 categories of developers:<\/p>\n