Macos – XAMPP (Mac) Virtual host showing 403

apache-http-servermacosvirtual-hostxampp

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.

Best Answer

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