obs wrote:
Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.
Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.
However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster
compared to using Apache alone.
If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.
One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.
Thanks.
I run nginx with php-fpm and see fast than apache-php.
But i heard wome one say nginx -apache php backend reduce cpu load?how about this?