Es soll ein VirtualHost angelegt werden für ein Zend Projekt.
Debian Squeeze, PHP 5.3.3-7+squeeze1, Apache 2.2.16.
Wenn ich das Projekt per localhost aufrufe, klappt es wunderbar.
Wenn ich es allerdings versuche per quickstart.local aufzurufen, erhalte ich einen Internal Server Error.
In der Error.log steht folgendes:
PHP-Code:
[Thu Jun 09 07:59:24 2011] [error] [client 127.0.0.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Gesagt getan, nachdem ich LogLevel auf debug gestellt habe kommt folgendes heraus:
PHP-Code:
[Thu Jun 09 07:59:24 2011] [debug] core.c(3063): [client 127.0.0.1] r->uri = /cgi-bin/php5/index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /cgi-bin/php5/index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /cgi-bin/php5/index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /cgi-bin/php5/index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /cgi-bin/php5/index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /index.php
[Thu Jun 09 07:59:24 2011] [debug] core.c(3069): [client 127.0.0.1] redirected from r->uri = /favicon.ico
[Thu Jun 09 07:59:24 2011] [debug] mod_deflate.c(615): [client 127.0.0.1] Zlib: Compressed 620 to 382 : URL /cgi-bin/php5/index.php
Daher dachte ich, dass das Problem vllt. in folgendem Abschnitt meiner apache2/sites-enabled/default Datei liegt:
PHP-Code:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Diesen habe ich gelöscht, Webserver neu gestartet... hat auch nichts gebracht.
Virtual Hosts Datei (apache2/sites-enabled/default):
PHP-Code:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
DocumentRoot /var/www
<Directory />
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/>
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName quickstart.local
DocumentRoot /var/www/projects/projectname/public
SetEnv APPLICATION_ENV "development"
<Directory /var/www/projects/projectname/public>
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
projectname/public/.htaccess
PHP-Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
/etc/hosts
PHP-Code:
127.0.0.1 localhost
127.0.1.1 debian.speedport.ip debian
127.0.0.1 quickstart.local
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Per google fand ich Leute die das gleiche Problem haben, aber meist umständlichere .htaccess Dateien hatten worin dann der Fehler bestand.
Meine ist die "Standard" Zend .htaccess.
Woran kann es noch liegen, erkennt jemand den Fehler oder hat Tipps zum weiteren debuggen ?