I'm on Mac Yosemite 10.10.5. Apache web server suddenly no longer starts. I tried changing the port to 8080. Also tried sudo apachectl stop and sudo apachectl start. Still won't open.
I thought this may have happened after adding a new printer and enabling print sharing. I turned that off and it still won't start. I can't remember which command I ran that gave me this message with some more details.
UPDATE: When I use sudo apachectl start
, I noticed the server is accessible through the browser even though the interface still says STOPPED, but when I go to localhost/webdirectory I just get not found.
There are several reasons your Apache server might fail to run. Something could be blocking the port it uses; there could be another instance of Apache already running; or there might be an incompatibility with the version of PHP you're using in MAMP.
The document root for your apache server, by default, is "Sites" in your home directory. That's not the root folder. Root is http://localhost/ . The folder you're refering to is located at http://localhost/~User/ .
This is because in Mac OS X there is already Apache pre-installed. So what you can do is to change the listening port of one of the Apaches, either the Apache that you installed with XAMPP or the pre-installed one. To change the listening port for XAMPP's Apache, go to /Applications/XAMPP/xamppfiles/etc and edit httpd.
After 48 hours of research, I found this working solution, I found the solution here: disable OSX's built-in Apache server.
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
This allowed XAMPP to start on 80, while POW runs on 20559.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With