Hello Guys, I am setting up a new commercial project which is expected to serve, hopefully, 100,000 visitors per day. As you know, Apache2 mpm_prefork is very slow. So, I plan to switch to Apache v2.4 mpm_event OR Nginx 1.10. I follow this procedure: Turn off mpm_prefork and php7.0 apache2 modules; Turn on apache2 php7.0-fpm.conf; Turn on mpm_event apache2 module and then restart apache2. Yes, Apache2 starts and runs. Now, my question is: Is the above procedure all I need to ensure that mpm_event runs stably? Will php7.0 work well yet with Apache2 server after php7.0 module has been unloaded? Will some of those php 7.0 extensions stop working? Is my mpm_event setup as fast as a Nginx server setup? My system is ISPConfig 3.1.11, Ubuntu 16.04.4 amd64, Apache v2.4.18, php 7.0.30. Hope to hear your valuable opinions as soon as possible.
mpm_event has a bug which causes disfunction of some threads leading to no response from one to the other ms. Tried it with a variety of configurations on different projects... couldn't get it to work properly debian 8,9. I'd suggest: stay with worker for a while, which is aswell much better than prefork. Many projects are setup easier using apache, still - causing more time spent in try'n'error mode
I don't think so, but haven't tested it. Personally, I use Nginx for all new sites, especially when I expect them to get more traffic.
Yes, speed is a crucial visitor experience. I have made mpm_event working finally. It is even more difficult to make the choice now.
worker and event are - except for fine tuning - interchangeable without issues usually, since they are both alike. nginx isn't that fast if you have to add many if-statements for rewrite rules ect. but apache can be blazing fast, just don't use the howtoforge setup and add mod_php mod_foo and especially not mod_bar apache has been a defacto standard, nginx is easier for load-balancing cases, serving static content or from backends ( php-fpm, apache proxy for whatever reason ect ). If you are used to apache, there is more need to deploy fast / fix issues in time or have high websites which would need conversion ( mod_rewrite, mod_something ) stick with apache and learn nginx in your spare time! keep satisfaction up. Especially I don't think ( haven't measured compareable real world data yet ) there is a big speed improvement at all. Usually ppl thought it would be fast, because they used mpm_prefork from the ages which ( in my opinion ) shouldn't be used anymore since php-fpm patch/stable for typical host environments. mod_fastcgi was a hazzle back then but in the end ... blazing fast, low resources server.... remember when 512mb of memory was plenty
Thank you everybody. I have made mpm_event working flawlessly with roundcube and ISPConfig 3.1.11. It shows that mpm_event can work with php 7.0 happily at this moment. My another concern is that: if dynamic content JS or php scripts run under Apache 2.4, will they run yet under Nginx 1.10 without any big corrections to the scripts themselves?
PHP script does not need to be changed to run on nginx. All you might have to do is to convert .htaccessrewrite rules to nginx syntax.