2009
26
Sep

403 Forbidden using MAMP

I have been playing with Codeigniter a lot lately. I was in the middle of working on something when MAMP gave me a 403 error.

The error was “403 Forbidden You don’t have permission to access / on this server” Navigating to any folder would give me the 403 error as well, even http://localhost:8888/MAMP/?language=English.

This was a pretty simple issue to correct. Not simple enough at the time though

  1. Stop all MAMP servers (Apache and MySQL Server)
  2. Navigate to Applications/MAMP/conf/apache
  3. Open httpd.conf
  4. You can probably open it with TextEdit. I opened it with Dreamweaver. Just make sure TextEdit is editing it in plain text format and not rich text format.
  5. Find the following section of code (on mine it was on line 378):
    <Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
    </Directory>
  6. Change “AllowOverride All” to “AllowOverride None
  7. Save the file
  8. Start MAMP and test the pages.

If that doesn’t work for you, you can always Google it. The MAMP forums have a lot of posts about it.

18 Responses to 403 Forbidden using MAMP

  1. Eugene says:

    You are a lifesaver. I somehow screwed up my MAMP and the modification above worked! Thank you!

  2. omi says:

    Thanks a lot. You save my day!

  3. Jackie says:

    And another satisfied customer!

    Thanks for this fix – I was resigning myself to 5 hours of fixing MAMP rather than 5 hours of client work!

  4. Thank you for sharing this! I have been using MAMP for years and somehow I broke it. After trying many other methods I finally found this and it worked for me. Whew, I can get back to work!

  5. Thanks for a direct answer on this…

    I was playing around with my development environment on my local machine and this suddenly stopped working…

    I’m not sure why it happened, but I appreciate a quick answer to exactly the problem I was having…

    Saved me the time of thinking (Which is hard… hehe) so you rock!

    I’m not sure how my httpd.conf file would have changed though because I don’t recall upgrading lately… oh well…

    Thanks for the quick answer to the problem your Kung-Foo is great!

  6. 5-squared says:

    Dude, thank you so much!!

    I’ve been sitting here for over an hour trying to figure this out.

    Followed your steps and it worked like a charm!

    Thank you!!

  7. Thank you soooooo much!!!!!!

  8. Ethan says:

    Lifesaving tip! I have no idea what caused the Forbidden screen to start coming up, and I’m stoked I found your fix before spending all night trying to figure it out!

  9. kasie says:

    thank you so much, this fixed my problem quickly!

  10. Lorenzo says:

    Grazie! it happens often to me while testing wordpress locally. now I don’t have to reinstall MAMP each time..

  11. vivaval says:

    Thank you! Thank you! You just saved me from a MAJOR panic attack!

  12. narlax says:

    thanks a lot it helped.

  13. indigital says:

    Hmmm, I’m having the exact same error messages but AllowOverride was already set to none…

  14. Fillipe says:

    Thank you.
    I tried other ways but only this worked perfectly.

  15. Ben says:

    Thanks heaps :)

  16. Ash says:

    Worked for me. Cheers!

  17. JG says:

    I know this is an old thread, but in case anyone is having the same problem:

    @indigital “Hmmm, I’m having the exact same error messages but AllowOverride was already set to none…”

    This was the case for me too. Turns out it was Web sharing in system prefs was conflicting, turn this off and MAMP works again. Seems you can’t test over the network and locally at the same time. I’d turned web sharing on to test a site on my iphone.

  18. KK says:

    Mine was also set to NONE.
    @JG You saved the day after hours of troubleshooting.

    Thanks a million

    PS. It’s dumb that I could not test my site on other devices as I work on it on the fly except I turn on websharing at every instance

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>