How to Change DocumentRoot?

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

How to Change DocumentRoot?

Postby atomicnicholas » 05. November 2007 12:06

Hi all,

When I change DocumentRoot (from httpd.conf) to my chosen directory, XAMPP runs without incident, but I get a "403 Forbidden" error (or other types of errors when I try different things out with it) when I run it from a browser (Safari or Firefox). I've changed permissions accordingly. The directory and files (index.html, etc.) are located in the directory I changed to. But it just won't run.

Can anyone please help? Is there a restriction that we're supposed to use a documentroot inside the xampp folder?

Here's the change I made:

Code: Select all
DocumentRoot "/Applications/xampp/xamppfiles/htdocs"

# ... and ...

<Directory "Applications/xampp/xamppfiiles/htdocs">

Code: Select all
DocumentRoot "/Users/mycomputername/Web/MyApplications"

# ... and ...

<Directory "/Users/mycomputername/Web/MyApplications">

Just a note that the default ~/htdocs works fine, but the changed one does not. This is strange because I've done this successfully in Windows and Linux but can't get it to run with a different DocumentRoot in MacOSX (Tiger).

Thank you.
Last edited by atomicnicholas on 06. November 2007 12:14, edited 1 time in total.
Posts: 2
Joined: 05. November 2007 11:08

Postby atomicnicholas » 06. November 2007 11:31

Anyone have an idea what's wrong? And what to do to fix this?

Posts: 2
Joined: 05. November 2007 11:08

Postby TShirt » 07. June 2008 13:17

It should work!

If you create a page in /Users/mycomputername/Web/MyApplications (let's say Foo.html) you should be able to open it with:


If you want xampp stuff you have to create 2 soft links in MyApplications:

ln -s /Applications/xampp/xamppfiles/htdocs/index.html index.html
ln -s /Applications/xampp/xamppfiles/htdocs/xampp xampp

Then open as usual:


Posts: 9
Joined: 07. June 2008 11:26

Return to XAMPP for Mac OS X

Who is online

Users browsing this forum: No registered users and 5 guests