Move htdocs folder in XAMPP 8.0.11-2 on Mac OS Big Sur 11.6

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

Move htdocs folder in XAMPP 8.0.11-2 on Mac OS Big Sur 11.6

Postby row3d » 13. December 2021 11:52

Hi, sorry if this has been answered before but I couldn't find it when I searched. I would like to share the htdocs folder on two machines on my network so I thought I would put all my files in my Dropbox and have the web server on both machines point to /Users/myusername/Dropbox/htdocs to get their files. That way I can develop my web app on both machines and see the results on either web server.

Trouble is that I can't seem to change the location of the htdocs folder on the Mac. I have tried changing some lines in httpd.conf from:

DocumentRoot "/opt/lampp/htdocs"
<Directory "/opt/lampp/htdocs">

to

DocumentRoot "/Users/myusername/Dropbox/htdocs"
<Directory "/Users/myusername/Dropbox/htdocs">

When I select 'Go to Application' in XAMPP, the browser gives me the message 'This site can’t be reached 192.168.64.2 refused to connect.'

Is there something else I need to do or is my approach all wrong? Any help would be greatly appreciated.
row3d
 
Posts: 1
Joined: 13. December 2021 11:40
XAMPP version: 8.0.11-2
Operating System: Mac OS Big Sur 11.6

Re: Move htdocs folder in XAMPP 8.0.11-2 on Mac OS Big Sur 1

Postby pmhegarty » 14. December 2021 22:25

My understanding is that to access any directory outside of the installation directory, the httpd process of Xampp must be added to system-preferences-full disk access because OS X has an additional security layer above the unix permissions.
To test, try accessing the folder using the php cli.
pmhegarty
 
Posts: 4
Joined: 31. January 2018 13:01
XAMPP version: 8.0.13
Operating System: OSX 12.1, Ubuntu 20.10 Win 11


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 32 guests