0

I keep getting Access Forbidden Error 403 when I try running my installation of XAMPP on my MAC

I am running the project outside of /Applications/XAMPP/htdocs. It's in my /Users/my_user_name/Projects/ directory.

Every time I try and go to my virtualhost I get a 403 error: Access forbidden.

I have edited my httpd-vhosts.conf file and I have allowed Virtual hosts in httpd.conf.

I have also set the User and Group to User my_user_name and Group Admin in httpd.conf

I even tried chmoding all my files and directory 777 but I still get Access forbidden.

I have also change Deny to Allow in the httpd-xampp.conf file in the new security settings.

The erro_log provided by XAMPP doesn't mention the 403 error I do see it in my access log as 127.0.0.1 - - [21/Aug/2013:14:45:20 -0400] "GET / HTTP/1.1" 403 1034

I am seeing this in the error_log [authz_core:error] [pid 52813] [client 127.0.0.1:57473] AH01630: client denied by server configuration:

Not sure what else to check or try. Please help lol.

2
  • what files do you have in /Users/my_user_name/Projects? Is there some default document (index.html or something similar)? Does the apache config point to whatever your default document name is? Might help if you post the contents of your <Directory> statement too..
    – Richie086
    Aug 21, 2013 at 19:24
  • I actually just figured it out I am going to post my answer below but it was adding Require all granted to the directory listing in the httpd-vhost.conf file.
    – Denoteone
    Aug 21, 2013 at 19:28

3 Answers 3

1

To fix this you can configure Apache to run as your OS X user. Open /Applications/XAMPP/xamppfiles/etc/httpd.conf and look for the following lines:

# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User daemon
Group daemon

Change User to your OS X username or add new user as follow, and save the file:

User yourusername
0

So yes, the link abow fixed the problem. I had to change in httpd.conf here:

<Directory />
    AllowOverride none
    Require all granted
</Directory>

before it was requile all denied Thanks a lot! Hope it also helps others.

2
  • Welcome to Super User! Your post is a comment not an answer the OP's question. On this site we value your answers and encourage you to contribute where you can. You can always comment on your own posts and once you've earned sufficient reputation you can comment everywhere. May 29, 2015 at 19:08
  • 1
    Also, please note that the order of answers can change over time and according to user preferences (e.g., sort most recent first, oldest first or by points) so "the link above" might not actually be above to the person reading your answer, or to you in a week's time. May 29, 2015 at 20:58
0

I struggled with this and many other XAMPP errors on my Mac. Eventually it turned out it was related to loss of compatibility with my version of MacOS after an update.

The newest version of OSX only works with XAMPP as a virtual machine (VM). Hope this saves someone a lot of time and effort!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .