Issue
When changing the domain e.g. from one subdomain (old_domain) to another (new_domain) applying the changes fails if basic authentication and FastCGI cache is set up.
Basic Authentication
Authentication of a site fails when changing its domain if a nginx basic auth had been set up via Manage->Authentication.
The renaming did successfully move all files from /etc/nginx/ploi/old_domain/ to /etc/nginx/ploi/new_domain/ but failed to apply the change to /etc/nginx/ploi/new_domain/server/auth.conf:
auth_basic "Authentication Required"; auth_basic_user_file "/home/site-user/old_domain/.htpasswd";
As this auth_basic_user_file does not exist anymore the access fails.
FastCGI
In the nginx file fastcgi-cache.conf the domain is not changed as well:
fastcgi_cache_path /etc/nginx/cache/old_domain levels=1:2 keys_zone=old_domain_without_dots:100m inactive=1440m;
Should change to
fastcgi_cache_path /etc/nginx/cache/new_domain levels=1:2 keys_zone=new_domain_without_dots:100m inactive=1440m;
The file fastcgi-php-cache wrongly stays like this:
fastcgi_cache old_domain_without_dots; ...
And should change to this:
fastcgi_cache new_domain_without_dots; ...