The server is configured to handle php files with fastcgi :
<IfModule mod_fastcgi.c>
AddHandler application/x-httpd-php .php
Action application/x-httpd-php /fcgi-bin/php-fpm virtual
ScriptAlias /fcgi-bin/php-fpm /fcgi-extsrvs-phpfpm
<Location "/fcgi-bin/php-fpm">
Order Deny,Allow
Deny from All
Allow from env=REDIRECT_STATUS
</Location>
</IfModule>
Then a virtual host is defined to use this fastcgi :
<VirtualHost *:80>
ServerName mydomain.org
DocumentRoot /var/www/mydomain.org
<Location />
Order Allow,Deny
Allow from All
AllowOverride None
</Location>
<IfModule mod_fastcgi.c>
# use the socket as defined for this pool
FastCgiExternalServer /fcgi-extsrvs-phpfpm -socket /var/run/php5-fpm/mydomain.org.sock
</IfModule>
# problem here
AliasMatch ^/(.*) /var/www/mydomain.org/index.php
</VirtualHost>
Everything is working fine, until I add the AliasMatch line (same problem with Alias). The goal is to handle every request with the index.php script. This cause a 500 error with the following log :
[error] [client 88.xxx.xxx.20] 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.
[debug] core.c(3112): [client 88.xxx.xxx.20] r->uri = /fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/
[debug] core.c(3118): [client 88.xxx.xxx.20] redirected from r->uri = /fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/fcgi-bin/php-fpm/
...
[debug] core.c(3118): [client 88.xxx.xxx.20] redirected from r->uri = /fcgi-bin/php-fpm/
[debug] core.c(3118): [client 88.xxx.xxx.20] redirected from r->uri = /
My guess is there is a conflict between the ScriptAlias and AliasMatch, but I don't know how to resolve it.