Cobra Forum

Plesk Panel => Plesk Service/Interface => Topic started by: mahesh on Dec 26, 2023, 07:33 AM

Title: Unable to rename a domain in Plesk for Windows Server: Site old.example.com does
Post by: mahesh on Dec 26, 2023, 07:33 AM
Question:
Unable to rename a domain in Plesk for Windows Server: Site old.example.com does not exist
Symptoms
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)
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

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.