0

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

  • 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. – nohillside 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. – Bastian Gruber 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 – Bastian Gruber Aug 12 '12 at 7:41
  • Then you probably have the built-in Apache running as well. – Gerry Aug 12 '12 at 11:01
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .