XAMPP: Access Forbidden!

15,496

Solution 1

It is not enough to set the permissions to 777 for the DocumentRoot and its enclosing directory. Permissions must be 777 (or something lesser, but I don't know what) for all directories from / down to the DocumentRoot. That's why this guy learned to put his vhost directories in his user directories: while it's more flexible than that, the point is the same.

Solution 2

This solutions works for me

<Directory />
    Options All
    AllowOverride All
    Order deny,allow
    Allow from all
</Directory>

Ref: https://serverfault.com/questions/124821/access-forbidden-using-xampp-on-macosx-10-5

Share:
15,496

Related videos on Youtube

Dan Rosenstark
Author by

Dan Rosenstark

When I was born, I knew nothing about programming. Projects MIDI Designer Pro for iPad, iPhone, iPod touch—dream | create | play your Perfect MIDI Controller on iOS MJDJ—Desktop Java application for MIDI Morphing (transforming) Handsonic Editor—Powerful and popular editor for the Roland Handsonic HPD-15 The KBase—A multi-hierarchical text editor (.Net standalone and Web versions) Technical rambles (blog) Contact Contact me via MIDIdesigner.com

Updated on September 18, 2022

Comments

  • Dan Rosenstark
    Dan Rosenstark over 1 year

    I just installed a fresh XAMPP on OSX. Apache runs and I can see the splash page.

    I open the httpd.conf and I set both places that point to htdocs to someplace else, which results in Apache showing an "Access Forbidden!" message.

    I plugged my directory here:

    <Directory "/Applications/XAMPP/xamppfiles/htdocs">
    

    and here:

    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    

    I have set the permissions to 777 for everything including the enclosing directory, but to no avail. I've also set the owner to nobody, just like htdocs.

    Strangely, I just did this whole thing with MAMP and had no problems serving that directory, but it was slow.

    • Admin
      Admin over 13 years
      Thank you, this is a good point and works well. I found out that permissions of 701 are sufficient, i.e. the directories need to have "execute" permission. Read permissions are not required. Execute permissions on folders are required to open them (as can be see here also: support.apple.com/kb/HT2963?viewlocale=en_US: "Also note that you must have execute permission for any folder that you can open; thus File Sharing requires execute permission set for other, world, and everyone for the ~/Public folder, while Web Sharing requires the same setting for the ~/Sites folder.").