XAMPP (Mac) Virtual host showing 403

8,715

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
Share:
8,715

Related videos on Youtube

Denoteone
Author by

Denoteone

I have 12 years of professional experience efficiently coding websites, web applications, and CMS plugins using current web technologies like PHP, Angular 2, and CSS(3) to list a few examples. Building state-of-the-art, easy to use, user-friendly websites and applications that have valid and efficient code is truly a passion of mine In addition to my knowledge base, I actively seek out new technologies and stay up-to-date on industry trends and advancements. Denoteone @ Miaou

Updated on September 18, 2022

Comments

  • Denoteone
    Denoteone almost 2 years

    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.

    • Steve Reeder
      Steve Reeder almost 11 years
      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..
    • Denoteone
      Denoteone almost 11 years
      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.
  • I say Reinstate Monica
    I say Reinstate Monica about 9 years
    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.
  • David Richerby
    David Richerby about 9 years
    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.