Mandar Apte

UI/UX Designer from Mumbai, Maharashtra, India.

Final Solution If MAMP Apache Server won’t start or doesn’t start at all

Before switching to Mac OSX Lion 10.7 & MAMP 2.0.2, I was using Mac OSX Snow Leopard 10.6.8 with MAMP 1.9.5

After Upgrading to Mac OSX Lion 10.7 and MAMP 2.0.1 or 2.0.2, suddenly everything went wrong. The Apache Server doesn’t start.

For almost the last month, I have been unable to update my website theme offline…

But when I check the folder called ‘log’ inside MAMP’s folder under applications (/Applications/MAMP/logs)

I opened the ‘apache_error.log’ Apache Log file, and there was a reason on my iMac why MAMP’s Apache server was not running.

Error: [Date] [alert] (EAI 8)nodename nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of “000-000-000-000.static.broadbandcompanyname”

So, the Error was related to ‘IPv4’

Then I created a new ‘Location’ inside the ‘Network’ tab, made all services like Ethernet, FireWire, and WiFi Inactive, and BOOM, Apache Server started.

(Make sure you have killed all services of MySQL through Terminal  or Activity Monitor before restarting Apache Server or just reboot your system)

So, Problem Solved…

Here is a Different take on it:

Solution 02:
Open the httpd.conf file with a text editor (/Applications/MAMP/conf/apache/httpd.conf)

Search the following line:

LoadModule unique_id_module modules/mod_unique_id.so

& Change it to:

#LoadModule unique_id_module modules/mod_unique_id.so

i.e. Add ‘#’ before that line

So, your Apache server will start to run normally again.

Comments

19 responses to “Final Solution If MAMP Apache Server won’t start or doesn’t start at all”

  1. Henry Avatar

    Great! Thanks for sharing, it working fine! I just have an exactly same problem after upgraded to 10.7

  2. Aly Avatar
    Aly

    I used Solution 02 and it worked! Many thanks, it took about 10 different web searches to finally figure it out, and it was so simple.

  3. Tim Avatar
    Tim

    Thanks alot. I still have 10.6.8 but solution 2 worked pretty well. It seems it is not a “Lion”-problem 😉

  4. Jon Bolden Avatar

    This worked for me! Awesome! The weirdest thing was my MAMP setup was working flawlessly until I restarted my machine day. Thank you for figuring this out. I’m on a MAC OS X with Lion 10.7.3, running MAMP 2.0.3.

  5. Gavin Avatar

    Easier way for method two is to disable the unique_id_module in the main Mamp window. Using Mamp Pro so not sure if Mamp users have the same window:

    Open the main MAMP window then:

    Server tab > Apache tab

    In the “Apache Modules” section, just un-check unique_id_module (just over half way down the list)

    Stop and start services and you’re good to go!

  6. Ross Avatar
    Ross

    im running OS 10.7.3 with MAMP 1.7.2 and option 2 was already done when i checked it and it’s still not working. Are there any other solutions? I couldn’t really follow option one.

    “Then I created new ‘Location’ inside ‘Network’ tab….” where do i find the network tab?

    Thanks for the help.

    I feel like IM SO CLOSE….ha

    1. Mandar Apte Avatar

      Hi Ross, Please Update your MAMP first then it should work…

  7. jlar Avatar
    jlar

    Thanks so much!… I tried so many things. This was the best solution for me. I used the Apache Port: 80 and MySQL: 3306. And changed my file (apache/httpd.conf) to what you said, but I also had to force quit all my mysqld processes, and reboot a few times.

  8. Paul Avatar
    Paul

    I found the solution by accident and all the others i found didn’t work for me but i thought id share it as i was pulling my hair out trying to get it working again.

    I had changed the apache directory to my own drive.

    1. Stop servers
    2. Open preferences and change the apache directory back to applications/mamp/htdocs
    3. Hit ok and start servers. Should work at this stage.
    4. If you want to use your own directory, stop servers and change it back.
    5. Start Servers.

    If you didn’t have your own directory i would try it and change it to something else anyway to see if it works.

    I know there are many problems out there but none of them worked for me.
    Hope it helps.

  9. davy hendry Avatar
    davy hendry

    hi there having trouble myself and just starting out with mamp – thanks for the pointers.

    In the end I just deleted this line from httpd.conf

    #LoadModule unique_id_module modules/mod_unique_id.so ( DELETED)

    Servers started normally OS 10.7.4

  10. Beat Avatar
    Beat

    Thanks so much; solution 2 solved the problem for me perfectly (MacPorts installation of apache on 10.8.2).

  11. DropTheNerd Avatar

    Thanks! Solution number 2 worked for me!

  12. Patrick Avatar

    Thank you so much. This solution worked a treat. Cheers!

  13. Gideon Kimbrell Avatar

    The first fix worked. The second one is not good because it removes functionality

  14. Scott Avatar
    Scott

    Thanks Paul!!

  15. Emery Avatar
    Emery

    The new 10.10 Yosemite update affects Apache again :(.

    1. Mandar Apte Avatar

      Update your MAMP installation, it should work…!!!

  16. King Avatar
    King

    Thanks for sharing your thoughts on mandar. Regards

  17. HwangC Avatar
    HwangC

    2nd Solution works! Thanks 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.