Change Apache MPM from prefork to worker

后端 未结 1 1026
萌比男神i
萌比男神i 2021-02-09 14:31

I need to change MPM prefork module to worker but it\'s not working on my Debian 9.1. When I enable worker module, PHP is not working. I can\'t enable php7.0 module back.

1条回答
  •  生来不讨喜
    2021-02-09 14:42

    I got the following error

    sudo a2enmod php7.2 
    Considering dependency mpm_prefork for php7.2:
    Considering conflict mpm_event for mpm_prefork:
    ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first!
    Considering conflict mpm_worker for mpm_prefork:
    ERROR: Could not enable dependency mpm_prefork for php7.2, aborting
    

    And to fix I simply did

    sudo a2dismod mpm_event
    sudo a2enmod php7.2
    sudo systemctl restart apache2
    

    you might also want to try restarting your server

    0 讨论(0)
提交回复
热议问题