I've been having issues with Xampp and virtual hosts under Ventura 13.6.5 (Intel Mini).
Xampp (v8.2.4-0) 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 -
<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/DeltaSierra/Documents/DevSites/test/public_html"
<Directory "/Users/DeltaSierra/Documents/DevSites/test/public_html">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride None
Require all granted
</Directory>
</VirtualHost>
The default Xampp localhost works fine, however local.test fails with a AH00132: file permissions deny server access: /Users/DeltaSierra/Documents/DevSites/test/public_html/index.html error.
In terms of trying to fix it, i have tried -
- Made sure the entire
/Users/DeltaSierra/Documents/DevSites/directory ischmod -R DeltaSierra:staff, which still results in a AH00132/403 error message. - Have tried a
chown -R 777on the/Users/DeltaSierra/Documents/DevSites/directory, same result. - Changed the Apache/httpd process (within httpd.conf) to run as
User DeltaSierra / Group staff, again same result. - Made sure the all the user/group ACL's (ie - user 'DeltaSierra', group 'staff' and 'everyone') on
/Users/DeltaSierra/Documents/DevSites/are set toRead & Write(and apply it to sub-directories etc), 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 -
sudo chmod -R +a "system allow list,add_file,search,delete,add_subdirectory,delete_child,chown,file_inherit,directory_inherit" /Users/DeltaSierra/Documents/DevSites/
Which failed as the system user doesn't exist and returns a UUID not found type error. I tried adding the daemon user, which does exist and Apache returned the error -
(13)Permission denied: [client 127.0.0.1:54286] AH00529: /Users/DeltaSierra/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that /Users/DeltaSierra/' is executable
But that doesn't make particular sense and seems to suggest making the entire /Users/DeltaSierra/ directory executable.
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.
I don't doubt i've missed something simple but, does anyone have any clue how to get Xampp to execute websites under a user owned directory/within ~/Documents?
Really appreciate any help as i'm currently going around in circles.
P.s - the reason to try and get Xampp to load sites within ~/Documents, is because my editors have to be elevated everytime i save to /Applications which is extremely annoying when editing large amounts of files.