PHP-FPM and Subdomains not working right (infinite redirect) WITH SOLUTION
I added some subdomains to ISPConfig for my websites. Because I want the URL's to look fine I use redirects so I can pull out the URL over a $_GET variable. But there is a Problem on ISPConfig because you get errors like this: "The Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary."
The cause of this message is that ISPConfig is using this line on "/etc/apache2/sites-available/youdomain.tld.vhost":
#YOURDOMAIN RewriteEngine on RewriteCond %{HTTP_HOST} ^www.yourdomain.tld$ [NC] RewriteRule ^(.)$ http://yourdomain.tld$1 [R=301,L] #YOURSUBDOMAIN RewriteCond %{HTTP_HOST} ^cst.yourdomain.tld$ [NC] RewriteCond %{REQUEST_URI} !^/webdav/ RewriteCond %{REQUEST_URI} !^/var/www/clients/client0/web1/web/cst/ RewriteRule ^/(.)$ /var/www/clients/client0/web1/web/cst/$1 [L]
Unfortunately this brings up an infinite redirect loop which can be solved when you replace "webdav" with "php5-fcgi".
I hope this helps.
System used: Ubuntu 12.04 with Apache2 and PHP-FPM on ISPConfig 3