You Need To Stop Using Nginx Now!
I just had the craziest experience. I was working with my rustic old Apache, getting ready to switch to Nginx. I set up php-fpm and created an application per user. As not to change too many things I switched Apache over to use php-fpm before setting Nginx up to use php-fpm. Once I got everything over to Nginx I decided I wanted to do a quick side by side page loading experience. To my surprise my low dynamic content PHP site took .27 seconds longer on Nginx (which it consistently had done) versus my decrepit, monolithic Apache server!
Come to find out all the tests you may have seen before, which showed Apache being absolutely destroyed by Nginx, seem to have a single flaw; mod_php sucks, a lot. There’s no mod_php for Nginx so the comparison between the two web servers is vastly exaggerated. In my case the Apache server was running faster than Nginx for page load times. Next time you see speed comparisons, it may pay to look and make sure you’re comparing apples to apples. You just might find that you’re comparing a software stack that utilizes better processes and isn’t necessarily incompatible with the stack you’re currently running.
I’m very happy that the results were what they were because after I setup Nginx I totally forgot that it isn’t compatible with .htaccess files! WordPress loaded but wasn’t too keen on functioning properly without it’s precious mod_rewrite rules it generated. While that wouldn’t necessarily be a problem for me I couldn’t leave my users hanging and I’m not going to rewrite their WordPresses myself.