XAMPP Apache Webserver localhost not working on MAC OS

ApacheMacosXampp

Apache Problem Overview


I install XAMPP server on MAC OS 10.6 it was working fine. After a lot of days I checked it, but not working this time, localhost not opening this time.

after some R&D I reinstall XAMPP server after uninstall

When I start the apache after reinstall it giving port 80 running a another webserver Then I restart system, then apache start ok, but same local host not working

Then I check Web Sharing in my System Preference then it was already Tuned Off ...

Please anybody tell me where I am wrong?

Apache Solutions


Solution 1 - Apache

This is what helped me:

sudo apachectl stop

This command killed Apache server that was pre-installed on MAC OS X.

Solution 2 - Apache

I had to disable OSX's built-in Apache server (XAMPP support thread):

sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist

This allowed XAMPP to start on 80, while POW runs on 20559.

What had failed: I reconfigured /etc/apache2/httpd.conf to listen on an alternate port and rebooted OSX. No luck.

Solution 3 - Apache

try

sudo /Applications/XAMPP/xamppfiles/bin/apachectl start

in terminal

Solution 4 - Apache

This solution worked perfectly fine for me..

  1. close XAMPP control

  2. Open Activity Monitor(Launchpad->Other->Activity Monitor)

  3. select filter for All processes (default is My processes)

  4. in fulltext search type: httpd

  5. kill all httpd items

  6. relaunch XAMPP control and launch apache again

Hurray :)

Solution 5 - Apache

To be able to do this, you will have to stop apache from your terminal.

sudo apachectl stop

After you've done this, your apache server will be be up and running again!

Hope this helps

Solution 6 - Apache

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.conf. Change the line "Listen 80" (80 is the listening port) to other port, eg. "Listen 1234".

Or,

To change the one for pre-installed Apache, go to /etc/apache2. You can do the same thing with file httpd.conf there.

After changing you might need to restart your Mac, just to make sure.

Solution 7 - Apache

Run xampp services by command line

To start apache service

sudo /Applications/XAMPP/xamppfiles/bin/apachectl start

To start mysql service

sudo /Applications/XAMPP/xamppfiles/bin/mysql.server start

Both commands are working like charm :)

Solution 8 - Apache

I was having this exact problem, the above solutions didn't make much sense to me.

My Solution:

Turn of Bluetooth! Worked a treat ..

After connecting my macbook pro to iphone5 (hotspot) I started getting error message, after turning of bluetooth the error message is gone ..Hope that helps somebody!

Solution 9 - Apache

I had similar issue after integrating MongoDB into XAMPP. However executing the command "sudo apachectl stop" fixed the problem

Solution 10 - Apache

Found out how to make it work!

I just moved apache2 (the Web Sharing folder) to my desktop.

  1. go to terminal and type "mv /etc/apache2/ /Users/hseungun/Desktop"

  2. actually it says you need authority so

  3. type this "sudo -s" then it'll go to bash-3.2

  4. passwd root

  5. set your password and then "mv /etc/apache2/ /Users/hseungun/Desktop"

  6. try turning on the web sharing, and then start xampp on mac

Solution 11 - Apache

If you are also running skype at the same time. It will give you error:

>port 80 running a another webserver

First close skype and restart your apache it will work fine.

Solution 12 - Apache

I had success with easy killing all active httpd processes in Monitor Activity tool:

  1. close XAMPP control

  2. open Monitor Activity

  3. select filter for All processes (default is My processes)

  4. in fulltext search type: httpd

  5. kill all showen items

  6. relaunch XAMPP control and launch apache again

Solution 13 - Apache

In my case, Web Sharing was running, which blocked XAMPP.

'Untick' Web Sharing in the Bluetooth Settings (or Network), which causes HTTPD to show in activity log.

Apache should now run and be available!

Solution 14 - Apache

Same thing as mine on OS X Mavericks.

After a couple of trials by error while changing Apache configuration, I got weird output on localhost/xampp. Thought PHP engine was messed up. However, 127.0.0.1/xampp is working completely okay.

Finally, I cleaned up the browser cache and reload the page again and Voila!

Resolved on Firefox...

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAmit BattanView Question on Stackoverflow
Solution 1 - ApacheYakov FainView Answer on Stackoverflow
Solution 2 - ApacheSteve ClayView Answer on Stackoverflow
Solution 3 - ApacheSahil DoshiView Answer on Stackoverflow
Solution 4 - Apacheminhas23View Answer on Stackoverflow
Solution 5 - ApacheÉrica SantosView Answer on Stackoverflow
Solution 6 - ApacheSurya Wijaya MadjidView Answer on Stackoverflow
Solution 7 - ApacheKamleshView Answer on Stackoverflow
Solution 8 - Apacheuser2021537View Answer on Stackoverflow
Solution 9 - ApacheBKPView Answer on Stackoverflow
Solution 10 - ApacheSteve HamView Answer on Stackoverflow
Solution 11 - ApachepriyankaView Answer on Stackoverflow
Solution 12 - ApacheJan P.View Answer on Stackoverflow
Solution 13 - Apachechris haysView Answer on Stackoverflow
Solution 14 - ApacheKen PegaView Answer on Stackoverflow