{"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 The problem is that most of the “Apache vs Nginx comparison” posts are written by the first 3 groups of people. The fourth group has long ago realized that there is enough info on the internet to stop talking about it over and over.<\/p>\n The lessons you should take from this post are:<\/p>\n 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. When Nginx first came into PHP world its popularity was mostly fueled by numerous benchmarks showcasing its speed vs a […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/posts\/34"}],"collection":[{"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/comments?post=34"}],"version-history":[{"count":5,"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/posts\/34\/revisions"}],"predecessor-version":[{"id":40,"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/posts\/34\/revisions\/40"}],"wp:attachment":[{"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/media?parent=34"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/categories?post=34"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dracony.org\/wp-json\/wp\/v2\/tags?post=34"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}\n
\n