Xampp: Access Forbidden!

Xampp: Access Forbidden!

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.

1

2 Answers

This solutions works for me

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

Ref:

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.