DocumentRoot other than htdocs 403 error.

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

DocumentRoot other than htdocs 403 error.

Postby wsanders » 13. January 2016 05:25

After installing XAMPP for Mac OS X it worked fine, showing the dashboard and everything. However, after attempting to change this line of code in httpd.conf
Code: Select all
DocumentRoot "/Applications/XAMPP/xamppfiles/htdocs"
<Directory "/Applications/XAMPP/xamppfiles/htdocs">

to
Code: Select all
DocumentRoot "/Volumes/Storage/wsanders/Desktop/webRootDir"
<Directory "/Volumes/Storage/username/Desktop/webRootDir">


I am trying to store the directory that is being served on another HDD but instead get an error 403 when it was previously working just fine.

When messing with permissions I have left them at the default
Code: Select all
drwxr-xr-x   2 wsanders  staff         68 Jan 12 22:20 webRootDir

and then matched them exactly using chmod and chown in the terminal.
Code: Select all
drwxrwxr-x   2 root      admin         68 Jan 12 22:05 webRootDir


I don't really know where to go from here other than just keeping it in the htdocs directory.
Any help is appreciated. :)
wsanders
 
Posts: 2
Joined: 13. January 2016 05:16
XAMPP version: .
Operating System: .

Re: DocumentRoot other than htdocs 403 error.

Postby Nobbie » 13. January 2016 13:56

It is not sufficient to grant appropriate rights to the folder webRootDir only, but you have also to grant it to ALL parent folders, i.e.

/Volumes/Storage/username/Desktop/webRootDir
/Volumes/Storage/username/Desktop
/Volumes/Storage/username
/Volumes/Storage
/Volumes

have to allow at least read access for the User and/or Group, which is used by Apache at runtime.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: DocumentRoot other than htdocs 403 error.

Postby wsanders » 13. January 2016 18:38

Just did that by adding the user daemon and group daemon and it showed a list of all files in the directory.
Thank you. :)
wsanders
 
Posts: 2
Joined: 13. January 2016 05:16
XAMPP version: .
Operating System: .


Return to XAMPP for macOS

Who is online

Users browsing this forum: No registered users and 20 guests