Virtual Host Apache '403 Access Forbidden' AH00132

Problems with the Mac OS X version of XAMPP, questions, comments, and anything related.

Virtual Host Apache '403 Access Forbidden' AH00132

Postby MacXamppUser » 13. March 2024 19:51

Hi all,
Apologies if this has been answered before but the search doesn't appear to be working correctly, falling over with a 'Sorry but you cannot use search at this time. Please try again in a few minutes.' message.

Any way, i've been having issues with Xampp and virtual hosts under Ventura 13.6.5 (Intel Mini). Xampp works perfectly fine with the default '/Applications/XAMPP/xamppfiles/htdocs' directory and any website under this works. However i'm wanting to add a virtual host for an additional 'website' pointing to a directory under my user '~/Documents' directory.

So i've enabled the vhost.conf file and added -
Code: Select all
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
    <Directory "/Applications/XAMPP/xamppfiles/htdocs">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>
<VirtualHost *:80>
    ServerName local.test
    DocumentRoot "/Users/MacXamppUser/Documents/DevSites/test/public_html"
    <Directory "/Users/MacXamppUser/Documents/DevSites/test/public_html">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>

The standard Xampp works fine, however the 'local.test' fails with a 'AH00132: file permissions deny server access: /Users/MacXamppUser/Documents/DevSites/test/public_html/index.html' error.

In terms of trying to fix it, i have tried -

  • Made sure the entire '/Users/MacXamppUser/Documents/DevSites/' directory is 'chmod -R MacXamppUser:staff', which still results in a 'AH00132'/403 error message.
  • Have tried a 'chown -R 777' on the '/Users/MacXamppUser/Documents/DevSites/' directory, same result.
  • Changed the Apache/httpd process (within httpd.conf) to run as 'User MacXamppUser / Group staff', again same result.
  • Made sure the all the user/group ACL's (ie - user 'MacXamppUser', group 'staff' and everyone) on '/Users/MacXamppUser/Documents/DevSites/' are set to 'Read & Write', exactly the same.

Looking at '/Applications/XAMPP/xamppfiles/htdocs', it seems it's permissions are set to 'root:admin'. However, the ACL's on '/Applications/XAMPP/xamppfiles/htdocs' seems to show a 'system' user which doesn't appear to be on the machine.

So changing Apache/httpd back to run as the default daemon user and group, i tried to add the 'system' user -
Code: Select all
sudo chmod -R +a "system allow list,add_file,search,delete,add_subdirectory,delete_child,chown,file_inherit,directory_inherit" /Users/MacXamppUser/Documents/DevSites/

Which failed as 'system' user doesn't exist and returns a 'UUID' not found type error. I tried adding the 'daemon' user, which does exist and it returned the error -
Code: Select all
(13)Permission denied: [client 127.0.0.1:54286] AH00529: /Users/MacXamppUser/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/Users/MacXamppUser/' is executable

But that doesn't make particular sense and seems to suggest making the entire '/Users/MacXamppUser/' directory 777.

So i'm at a loss now and it seems unless websites are under '/Applications/XAMPP/xamppfiles/htdocs', Xampp (Apache) doesn't want to know.

Does anyone have any clue how to get Xampp to execute websites under a user owned directory/within '~/Documents'?

Much appreciate for any help as i'm going around in circles currently :(

P.s - reason to try and get Xampp to load sites within '~/Documents', is most of my editors have to be elevated everytime i save to '/Applications' which is extremely annoying when editing large amounts of files.
MacXamppUser
 
Posts: 3
Joined: 13. March 2024 19:03
XAMPP version: 8.2.4.0
Operating System: Mac Ventura 13.6.5

Re: Virtual Host Apache '403 Access Forbidden' AH00132

Postby SoccerGuy3 » 22. March 2024 23:16

did you ever get this working? I am also trying to run sites out of my ~/Documents folder
SoccerGuy3
 
Posts: 2
Joined: 22. March 2024 22:28
XAMPP version: 8.0
Operating System: MacOS

Re: Virtual Host Apache '403 Access Forbidden' AH00132

Postby MacXamppUser » 03. April 2024 14:47

SoccerGuy3 wrote:did you ever get this working? I am also trying to run sites out of my ~/Documents folder

Nope. It seems to be a permissions issue but after spending another day on it going around in circle, i didn't get anywhere. In the end i moved to MAMP, which is better and worse (it's expensive for starters) but does allow you to use other directories for hosting out of.
MacXamppUser
 
Posts: 3
Joined: 13. March 2024 19:03
XAMPP version: 8.2.4.0
Operating System: Mac Ventura 13.6.5

Re: Virtual Host Apache '403 Access Forbidden' AH00132

Postby marctremblay » 07. April 2024 15:30

I also tried for a couple days to set up XAMPP under macOS with a different htdocs location (on my USB drive) and it would work for a short while and then the next minute or when you restart XAMPP or the computer then it doesn't work anymore and results in all error 500 or 403. I ended up using the free version of MAMP and in under 5 minutes it was all set up and working perfectly fine. It's been running for 24 hours without any issue.
marctremblay
 
Posts: 5
Joined: 03. April 2024 15:39
XAMPP version: 8.2.4
Operating System: macOS 14.4.1

Re: Virtual Host Apache '403 Access Forbidden' AH00132

Postby markj » 09. May 2024 17:35

I had the same problem and after spending a couple of days altering the /etc/httpd.conf, httpd-vhosts.conf, and trying to change file ownership and permissions - all of which failed to resolve the problem - I ended up uninstalling and re-installing XAMPP on MacOS.

I wish I had a solution to share, but I wanted to put in a plug for better support for moving the 'htdocs' tree to somewhere besides the 'Applications' folder. On many Mac systems, the OS hard drive is not that large and it certainly would be useful to be able to successfully move the document root somewhere else without breaking the XAMPP installation.
markj
 
Posts: 1
Joined: 09. May 2024 17:27
XAMPP version: 8.2.4
Operating System: MacOS


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 25 guests