XAMPP Apache Webserver localhost not working on MAC OS

190,026

Solution 1

This is what helped me:

sudo apachectl stop

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

Solution 2

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

try

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

in terminal

Solution 4

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

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

Share:
190,026
Amit Battan
Author by

Amit Battan

iOS | Swift | Objective-C | iOS Developer | React Native | 13+ years experience | Team Management | Project planning https://in.linkedin.com/in/amitbattan

Updated on January 21, 2020

Comments

  • Amit Battan
    Amit Battan over 4 years

    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?

  • Axel M. Garcia
    Axel M. Garcia over 11 years
    Also, sometimes rebooting OSX prevents XAMPP from starting on 80 even though Web Sharing says it's off. Solution is to toggle Web Sharing on then off again, then XAMPP will start.
  • pal4life
    pal4life over 11 years
    This solution worked for me. But I am unsure what this did. and how can I enable the default apache incase I need to? Thanks.
  • Reid
    Reid over 10 years
    This worked like a charm! Although I just did the same thing in the terminal: $ sudo killall httpd Thanks!!
  • Teodora
    Teodora about 10 years
    the sudo command from the terminal did nothing for me. I went to the AM and killed the two httpds but they reappeared .... what should I do?
  • lighter
    lighter about 10 years
    I have a question, why xampp apache services doesn't stop when I click XAMPP APP's STOP?
  • BKP
    BKP almost 9 years
    Another tip... as far as possible avoid using default port no. I changed it to 90
  • molerat
    molerat almost 7 years
    Thanks. Do I have to do this every time I restart my computer??
  • JonathanDavidArndt
    JonathanDavidArndt over 6 years
    This answer is identical to a previous answer. If you have something to add or improve, please suggest an edit to the original answer.
  • mehmoodnisar125
    mehmoodnisar125 almost 5 years
    this answer also helps me.
  • Addy
    Addy over 4 years
    Going on 10 years later and this solution still worked for me.