Renaming a domain switches mod_proxy_fcgi from socket to tcp

short description

If a domain gets renamed, the Apache vHost file is getting 'broken' due to switching from socket connection to TCP connection.

correct behaviour

Keep the settings.

environment

Server OS: Debian Server OS version: 8 ISPConfig version: 3.1.3

code snippets

100-testdomain.local.vhost (original domain name, some unnecessary lines cut out)

<Directory /var/www/testdomain.local>
		AllowOverride None
				Require all denied
		</Directory>

<VirtualHost 8.8.8.8:80>

					DocumentRoot /var/www/clients/client1/web2209/web

		# suexec enabled
		<IfModule mod_suexec.c>
			SuexecUserGroup web2209 client1
		</IfModule>
		<IfModule mod_fastcgi.c>
				<Directory /var/www/clients/client1/web2209/cgi-bin>
										Require all granted
								    </Directory>
				<Directory /var/www/testdomain.local/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
				<Directory /var/www/clients/client1/web2209/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
                Action php5-fcgi /php5-fcgi virtual
				Alias /php5-fcgi /var/www/clients/client1/web2209/cgi-bin/php5-fcgi-8.8.8.8-80-testdomain.local
                FastCgiExternalServer /var/www/clients/client1/web2209/cgi-bin/php5-fcgi-8.8.8.8-80-testdomain.local -idle-timeout 300 -socket /var/lib/php5-fpm/web2209.sock -pass-header Authorization
		</IfModule>
		<IfModule mod_proxy_fcgi.c>
			#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php5-fpm/web2209.sock|fcgi://localhost//var/www/clients/client1/web2209/web/$1
			<Directory /var/www/clients/client1/web2209/web>
				<FilesMatch "\.php[345]?$">
						SetHandler "proxy:unix:/var/lib/php5-fpm/web2209.sock|fcgi://localhost"
				</FilesMatch>
			</Directory>
			</IfModule>


</VirtualHost>

100-therenamedtestdomain.local.vhost (after renaming the domain, some unnecessary lines cut out)

<Directory /var/www/therenamedtestdomain.local>
		AllowOverride None
				Require all denied
		</Directory>

<VirtualHost 8.8.8.8:80>

					DocumentRoot /var/www/clients/client1/web2209/web

		# suexec enabled
		<IfModule mod_suexec.c>
			SuexecUserGroup web2209 client1
		</IfModule>
		<IfModule mod_fastcgi.c>
				<Directory /var/www/clients/client1/web2209/cgi-bin>
										Require all granted
								    </Directory>
				<Directory /var/www/therenamedtestdomain.local/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
				<Directory /var/www/clients/client1/web2209/web>
					<FilesMatch "\.php[345]?$">
						SetHandler php5-fcgi
					</FilesMatch>
				</Directory>
                Action php5-fcgi /php5-fcgi virtual
				Alias /php5-fcgi /var/www/clients/client1/web2209/cgi-bin/php5-fcgi-8.8.8.8-80-therenamedtestdomain.local
                FastCgiExternalServer /var/www/clients/client1/web2209/cgi-bin/php5-fcgi-8.8.8.8-80-therenamedtestdomain.local -idle-timeout 300 -host 127.0.0.1:11218 -pass-header Authorization
		</IfModule>
		<IfModule mod_proxy_fcgi.c>
			#ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:11218/var/www/clients/client1/web2209/web/$1
			<Directory /var/www/clients/client1/web2209/web>
				<FilesMatch "\.php[345]?$">
						SetHandler "proxy:fcgi://127.0.0.1:11218"
				</FilesMatch>
			</Directory>
			</IfModule>


</VirtualHost>