Apache stopped working for me all of a sudden when I upgraded my Mac to Mojave. I attempted to shut down all of my Apache processes running but still had no luck.
What I found was I had to disable OSX’s built-in Apache Servers:
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
After doing that, I restarted and everything was working again!
sudo apachectl -k restart