better for a web server MPM prefork o worker?

Discussion in 'General' started by willoriker, Nov 23, 2022.

  1. willoriker

    willoriker Member

    i have perfect server ubuntu 18.04+apache , now i read about MPM for first time and i like to know wich is the best for handle trafic , default setting in this perfect server and if i need to change, a good guide to do it
     
  2. pyte

    pyte Well-Known Member HowtoForge Supporter

  3. willoriker

    willoriker Member

    when i try this
    sudo apachectl -M | grep 'mpm'​
    i get this
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7
    mpm_prefork_module (shared)​
     
  4. pyte

    pyte Well-Known Member HowtoForge Supporter

    Thats ok as you see "mpm_prefork_module (shared)" is configured. The warning "AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7" just tells you that you use the option "NameVirtualHost" in your 000-ispconfig.vhost file on line 7. In the next apache2 release this option is not necessary anymore, no need to worry.

    The line probaly looks something like this:
    Code:
    NameVirtualHost xxx.xxx.xxx.xxx:80
    which translates to:

    Code:
    <VirtualHost xxx.xxx.xxx.xxx:80>
    
    or
    
    <VirtualHost *:80>
     
  5. willoriker

    willoriker Member

    if i have MPM prefork, is i a good idea to change to event in my apache?, do i get more transaction performance?
     
  6. michelangelo

    michelangelo Active Member

    Yes, you should be able to serve more requests as with perfork.
    Did you mean that?
     
  7. pyte

    pyte Well-Known Member HowtoForge Supporter

  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Just as explanation, older systems use prefork mpm but since a while we switched to mpm_event. When switching away from prefork, you must be aware that mod_php stops working, so depending on how you set up your websites, you might break the system. So before switching the apache mpm, check that no sites uses mod_php and uninstall apache mod_php module. Also, some applications like phpmyadmin and Roundcube use mod_php, they will stop working and you must configure php-fpm for them.
     
  9. willoriker

    willoriker Member

    thanks, till, if i update my system to ubuntu 20 o 22, do i fix this problem?, or i need to create a new server with this ubuntu´s versions?
    , and, if i need to create a new server, can i use your tool for moving all data from old to new w/o fear?. tx a lot
     
  10. willoriker

    willoriker Member

    are there a guide for perfect server with ubuntu 22?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    For newer systems, we use the auto installer:

    https://www.howtoforge.com/ispconfig-autoinstall-debian-ubuntu/

    There is no issue, so nothing that needs to be fixed. You ant to change the mpm, which you wont probably notice unless you have a highly loaded web server that runs large sites anyway. And if you change the mpm, you must adjust your setup to be compatible with the new mpm.

    Moving to a new server is possible as well of course, but there is no need to unless you want to use newer hardware anyway.
     
  12. willoriker

    willoriker Member

    yes, really i think in a new disk (not a entire server) for replace in my actual server, about your aswer "There is no issue, so nothing that needs to be fixe..." i was talking about your comment "..older systems use prefork mpm but since a while we switched to mpm_event...."
     

Share This Page