After XAMPP can’t access to localhost (403)

apache-http-serverlocalhostosx-mavericksxampp

I've just got a MacBook Pro a few months ago. I've installed XAMPP on it.

After I googled a bit, I found OSX has its own apache service built in, so I removed XAMPP.

I've tried to configure my apache localhost, but it throws 403 Forbidden error when I try to open http://localhost/, and I can't figure out why!

Can anyone give me help in setting up the in-built Apache Web Service on OSX?

EDIT 1: In terminal the sudo tail /var/log/apache2/error_log display this, after I try to reach http://localhost/:

[Sat Jun 21 12:07:02 2014] [error] [client ::1] (13)Permission denied: access to / denied (filesystem path '/Users/rgstudio/Documents/RGStudio') because search permissions are missing on a component of the path
[Sat Jun 21 12:07:02 2014] [error] [client ::1] (13)Permission denied: access to /favicon.ico denied (filesystem path '/Users/rgstudio/Documents/RGStudio') because search permissions are missing on a component of the path

Best Answer

Did you try the correct port number?

http://localhost:80 or http://localhost:443 or http://localhost:8080

it could be any other port number depending on the configuration, see your main XAMPP window. check your \xampp\apache\conf\httpd.conf if you would like to change it.

if that doesn't get the problem fixed, try this

  1. Open the httpd-xampp.conf file at the location \xampp\apache\conf\httpd.conf using a text editor
  2. Search for the text #New XAMPP security concept and beneath that find the line Deny from all.
  3. Replace the word Deny with Allow so that it becomes Allow from all
  4. Now search the text and between this opening tag line and its closing tag line , add the line Require all granted and save(overwrite) the file.
  5. Now restart XAMPP and test.