Unable to rename a domain in Plesk for Windows Server: Site old.example.com does

Started by mahesh, Dec 26, 2023, 07:33 AM

Previous topic - Next topic

mahesh

Question:
Unable to rename a domain in Plesk for Windows Server: Site old.example.com does not exist
Symptoms
  • When renaming a domain from old-example.com to example.com, the operation fails with the following error message appears in Plesk:
QuoteError: Site old.example.com does not exist
        at (WebServerManager::renameHosting line 3083)
        at renameHosting(old.example.com, example.com)(WebServerManager::renameHosting line 3122)
        at execute console command --rename-vhost(vconsoleapp::start line 122)
        at execute "C:\Program Files (x86)\Parallels\Plesk\admin\bin64\websrvmng" --rename-vhost "--vhost-config=tmp2811.tmp" "--old-name=old-example.com"(vconsoleapp::run line 139) (Error code 1)
QuoteError: websrvmng failed: Site old-example.com doesn't exist
        at (WebServerMap::get line 189)
        at startHosting(old-example.com)(WebServerAdapter::startHosting line 772)
        at execute console command --start-vhost(vconsoleapp::start line 122)
        at execute "C:\Program Files (x86)\Parallels\Plesk\admin\bin64\websrvmng" --start-vhost "--vhost-name=old-example.com"(vconsoleapp::run line 139)
(Error code 1)
  • The "plesk repair web" utility fails with the error message below:
c:\>plesk repair web old-example.com
Repairing web server configuration
Repairing web server configuration for the domain
old-example.com ............................................... [FAILED]
- Filename:
\?\C:\Inetpub\vhosts\old-example.com\httpdocs\web.config
Line number: 14
Error: Configuration file is not well-formed XML

In module
Exception type: System.Runtime.InteropServices.COMException
<...>
In some cases, the folder of the domain old-example.com is already renamed to example.com in %plesk_vhosts%.

Cause
Invalid website configuration in IIS or domain's web.config file.

Resolution
  • Connect to the Plesk server via RDP.
  • If the folder example.com already exists in %plesk_vhosts%, rename it to old-example.com.
  • Rename domain's file web.config to web.config.orig.
  • Start Internet Information Services (IIS) Manager at Windows Start > All Programs > Administrative Tools.
  • In IIS Manager, expand SERVERNAME > Sites > right-click on example.com > click Remove.
  • Start a command prompt as an Administrator and repair the website old-example.com:

c:\>plesk repair web old-example.com
7.Repair password-protected directories:

c:\>"%plesk_cli%\repair.exe" --synchronize-protected-directories-storage
8.Log in to Plesk and rename the domain to example.com.

9.Rename web.config.orig back to web.config.