I'm trying to set up nextcloud on a home ubuntu box.

I've got php 7.4 installed, apache, etc.

However apache2ctl -M does not show php as shared. This causes (I guess) the http://localhost/nextcloud setup GUI to render as raw php code in the browser.

When I try to do a2enmod php7.4 I get:

Considering dependency mpm_prefork for php7.4:
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.4, aborting

When i attempt to a2dismod mpm_worker or mpm_prefork it says

Module mpm_prefork already disabled

This is a new install, no previous versions of PHP, etc. I've gone pretty slowly and methodically through the nextcloud docs which seemed to work until I ran into this. I'm also pretty new so if there's any config files I need to edit please let me know their paths.

  • Hey i saw this was posted 8 days ago and im working on the same issue, Ive dug into the apache config and it seems that php7.4.load and php7.4.conf files are missing even though dpkg says the libapache2-mod-php7.4 (the package to install to get php7.4 working for apache2) package is installed and should provide two files that it is not providing on install. Im going to work on it a bit more, but I have gotten it to work just using php8.0 instead so you may want to explore installing that to get your instance working
    – Kyle H
    Jul 15, 2021 at 23:04

2 Answers 2


Wipe your server (if possible) and use the provided vm scripts from Nextcloud at this link. I was also able to get my own instance going by using php 8.0 instead of 7.4. Docker and snap packages are also available that I can get going.


The error message is:

Module mpm_event is enabled

you are trying to disable the wrong module.

a2dismod mpm_event
  • this will break. did when i ran it. they you have to switch php versions to 8 to get it working again anyways
    – Kyle H
    Jul 19, 2021 at 15:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .