ich nutze seit längerem ohne Probelme XAMPP unter MAC OS X Leopard.
Da ich mir nun das PHP Framework Symfony installiert habe, muss ich mir VirtualHosts einrichten.
Mein Document Root ist /Applications/xampp/xamppfiles/htdocs
In diesem Ordner habe ich für symfony den Ordner "sjprojects/askeet" angelegt.
Zusätzlich befindet sich ein altes PHP Projekt in "projekt1".
In die httpd.con hab ich für die VirtualHosts folgendes angelegt:
- Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
ServerName askeet
DocumentRoot /Applications/xampp/xamppfiles/htdocs/sfprojects/askeet/web
DirectoryIndex index.php
Alias /sf /usr/lib/php/pear/data/symfony/web/sf
<Directory /usr/lib/php/pear/data/symfony/web/sf>
AllowOverride All
Allow from All
</Directory>
<Directory /Applications/xampp/xamppfiles/htdocs/sfprojects/askeet/web>
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName projekt1
DocumentRoot /Applications/xampp/xamppfiles/htdocs/projekt1
</VirtualHost>
Über http://askeet soll ich also in meinem Symfony Projekt landen.
Über http://projekt1 in meinem alten PHP Projekt.
In meine etc/hosts Datei von OS X habe ich folgendes geschrieben:
- Code: Select all
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 askeet
::1 askeet
127.0.0.1 projekt1
::1 projekt1
Nun habe ich aber das Problem, dass bei ERSTEN Aufruf der URL im Browser XAMPP auf xampp/index.php weiterleiten will und im Browser folgende Fehlermeldung steht:
- Code: Select all
Not Found
The requested URL /xampp/index.php was not found on this server.
Wenn ich die URL ein zweites Mal aufrufe funktioniert es aber. Es funktioniert dann so lange bis ich dazuwischen eine fremde URL aufrufe.
Da das ganz etwas schwer zu erklären ist habe ich folgendes kurzes Video gemacht:
Link entfernt, da Problem gelöst.
EDIT: Das Problem tritt ausschließlich im Safari auf. Im Firefox klappt es auf anhieb. Wie kann das denn sein? Wie kommt Safari auf die Idee auf /xampp/index.php weiterzuleiten?