0
ezbie
7y

Guys, I don't know if it's a problem only with me but I'm having to fix apache daily in my Ubuntu 17.04. I fixed it 5 times already, but every time I restart my computer something different breaks.

Yesterday I fixed it because the apache2 service wouldn't start, after tracking the logs I found out the in /etc/apache2/mods_enabled had mysteriously disappeared. I fixed it, web server worked okay.

I shutdown the computer, and today I boot it and accessing http://127.0.0.1 only gives me a blank page. As I could not figure out what happened, so I completely removed apache2 and reinstalled it. Now I it loading the pages only partially.

So in trying to find out what's happening, it seems apache2-mod-php7.0 is disabled, but when I try enabling it with a2enmod php7.0 it says

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

Like, does anyone has any clues? I've been fixing this shit every 2 days in the last 2 weeks, could this be a problem with Ubuntu?

Comments
  • 0
    PS the firs lines in the image says connect.inc.php is missing, but it is not, it's there and is properly configured.
  • 1
    Nginx > Caddy > Lighttpd > Apache
  • 1
    I have no solution either, but sometimes it helps if you slam the error message into Google.

    Maybe this helps?

    https://goo.gl/9eAQSk

    https://askubuntu.com/questions/...
  • 0
    Apache requiring insane levels of configuration is exactly why I recommend nginx.
    It is nothing to do with Ubuntu.
  • 0
    Don't reboot...?
  • 1
    4 words: fourteen point zero four.
  • 0
    Docker is the solution
  • 1
    @mw108 I had googled it already, but in taking a second look I found an answer to my problem here in SO: https://stackoverflow.com/questions...

    It consists of disabling mpm_event (sudo a2dismod mpm_event). I had done it already, but it prevented apache2 from starting, which doesn't happen if you enable mpm_prefork afterwards [and php7.0](sudo a2enmod mpm_prefork && sudo a2enmod php7.0).

    Anyways, that still gave me a thought on why is it breaking everyday, so thinking about what @jespersh has told me, I tested the HDD using gnome-disk-utility, the results are as follows https://ibb.co/dWeO6a

    Should I replace my HDD?
  • 0
    Moved to Arch Linux again, apache is rocking, no problems so far.
Add Comment