Articles in this section

Unable to rename a Domain or Subscription in Plesk for Windows Server: Error: Site does not exist

Plesk for Windows kb: technical

Applicable to:

  • Plesk for Windows

Symptoms

  • When renaming a domain from old-example.com to example.com, the operation fails with the following error message appears in Plesk:

    PLESK_ERROR: Error: 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)


    PLESK_ERROR: Error: 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)

  • In connection to the errors above, errors that are similar to the following can be found in the %plesk_dir%admin\logs\php_error.log:

    CONFIG_TEXT: trace: #0 (0): Smb_Exception_Syntax::handleError(integer '2', string 'SimpleXMLElement::__construct(): hfdhfdhf', string 'C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Web\WebConfig\Document.php', integer '34')
    #1 C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Web\WebConfig\Document.php(34): SimpleXMLElement->__construct(string 'hfdhfdhf')
    #2 C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Web\WebConfig\Document.php(16): Plesk\Service\Driver\Web\WebConfig\Document->setContent(string 'hfdhfdhf')
    #3 C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Web\WebConfig\IIS.php(24): Plesk\Service\Driver\Web\WebConfig\Document->__construct(string 'hfdhfdhf')
    #4 C:\Program Files (x86)\Plesk\admin\plib\Service\IIS\Manager.php(547): Plesk\Service\Driver\Web\WebConfig\IIS->load(object of type Db_Table_Row_Domain, string 'C:\Inetpub\vhosts\example.com\httpdocs\test\web.config')
    #5 (0): Service_IIS_Manager->{closure:Service_IIS_Manager::updateErrorDocs():545}(string 'C:/Inetpub/vhosts/example.com/httpdocs/test', integer '0')

  • The plesk repair web utility may fail with the following error:

    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
    <...>

  • There may be no old-example.com site in IIS Manager > SERVERNAME > Sites.

  • In some cases, the folder of the domain old-example.com is already renamed to example.com in  %plesk_vhosts%

Cause

Invalid, corrupted or malformed website configuration files (these are named web.config) for IIS reside in the main directory or the subdirectories of the old-example.com website and are preventing the renaming process from being finalized without errors.

Resolution

In order to resolve such issues, you must do the following:

  1. Connect to the Plesk server via RDP

  2. If the folder example.com already exists in %plesk_vhosts%, rename it to old-example.com.

  3. Browse the directories and subdirectories of old-example.com and check and rename its invalid, corrupted or malformed web.config files to web.config.orig.

  4. Start Internet Information Services (IIS) Manager at Windows Start > All Programs > Administrative Tools.

  5. In IIS Manager, expand SERVERNAME > Sites > right-click on example.com > press Remove.

  6. Start a command prompt as an Administrator and repair the website old-example.com:

    C:\> plesk repair web old-example.com

  7. Repair the password-protected directories on the server:

    C:\> "%plesk_cli%\repair.exe" --synchronize-protected-directories-storage

  8. Log into Plesk and rename the domain to example.com again, because this time the attempt should be successful.

After the domain has been renamed successfully via the Plesk GUI, you may rename the web.config.orig files (which were initially causing the issue) back to web.config.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.