Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a strange problem:

I installed XAMPP long time ago and created a folder with an index.php file in my sites folder. When i start XAMPP and go to the browser localhost/~username i can see the folder-structure.

I click on the folder i created some month ago, and safari shows me the index.php file.

But now i create a new folder, with a new index-file in it, and navigate to it, i'm getting an 404 Error.

Both folders are in the same Directory: ~/Sites

  1. Open localhost/~username and i can see all folders in the ~/Sites - Folder
  2. Clicking on the folder created long time ago: works
  3. Clicking on the new folder created few seconds ago: Error 404

I think there is a problem in the apache-config file, but i do not understand why apache finds only the new file.

enter image description here

share|improve this question
Did you look at the permissions of the new folder? The content must be accessible by all users, otherwise Apache won't be able to read the content. – patrix Aug 11 '12 at 18:48
How did you configure XAMPP? Can you paste your Apache configuration? – Gerry Aug 11 '12 at 20:29
@patrix: Permissions are the same for each folder. – gruberb Aug 12 '12 at 7:35
@Gerry: Do you mean the httpd.conf - file? I don't understand: in the xampp-httpd.conf the document root is different than in the httpd.conf - file from /etc/apache2 – gruberb Aug 12 '12 at 7:41
Then you probably have the built-in Apache running as well. – Gerry Aug 12 '12 at 11:01
up vote 0 down vote accepted

Ok, i don't know why but i changed the Document-Root-Folder in the XAMPP-Config-File to match /username/Sites.

Now the other folders work, too.

I don't understand why one folder works with the old configuration, and newer ones don't.

To all with the same problem:

The XAMP-Config-File must be the same document-root as the /etc/apache2 - config file on the mac

Strange thing, on my other Mac the Document-Paths are different but work.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.