Archive for the ‘Plesk’ Category

Do this before removing a Domain from Plesk

Sunday, September 13th, 2009

“%plesk_bin%\websrvmng.exe” –remove-sites-cache

And remove from the Plesk control panel

If that’s failed. Please run this command, and try delete again.

“%plesk_bin%\websrvmng.exe” –reconfigure-vhost –vhost-name=<your_domain>

Rebuild Plesk’s WebMail

Sunday, April 26th, 2009

> websrvmng –reconfigure-webmail
> defpackagemng –fix –type=webmail.horde
>

Manually delete records for any domain from plesk psa database

Friday, December 5th, 2008

Manually delete records for any domain from psa database ( this is plesk windows with psa in mysql database, but should work on msaccess db too )

cd %plesk_dir%\mysql\bin && mysql.exe -u admin -P8306 psa -p

PASSWORD

use psa \G

delete from db_users where db_id=(SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name=’example.com’));
delete from data_bases where dom_id=(SELECT id FROM domains where name=’example.com’);
delete from mail where id=(SELECT id FROM domains where name=’example.com’);
delete from subdomains where id=(SELECT id FROM domains where name=’example.com’);
delete from dns_recs where id=(SELECT id FROM domains where name=’example.com’);
delete from domains where id=(SELECT id FROM domains where name=’example.com’);
delete from hosting where dom_id=(SELECT id FROM sys_users where home=’C:/inetpub/vhosts//example.com’);
delete from FROM sys_users where home=’C:/inetpub/vhosts//example.com’;
delete from dns_zone where displayName=’example.com’;

exit;

iisweb /delete “example.com”
echo y | del “C:\Inetpub/vhosts\example.com”
echo y | del “C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\Postoffices\example.com”
echo y | del “C:\Program Files\SWsoft\Plesk\Mail Servers\Mail Enable\config\Postoffices\example.com”

“C:\Program Files\SWsoft\Plesk\admin\bin\domain.exe” -r example.com
“C:\Program Files\SWsoft\Plesk\admin\bin\DNSMng.exe” restart

Besides you might need to delete post office manually from mailenable.msc -> postoffices and a few other things in GUI

Repair Plesk DNS named.conf

Tuesday, November 25th, 2008

[FIX[ Zone file and corresponding record in named.conf are missed for particular domain

Article ID: 5242

Last Review: Oct,6 2008

Author: Basalyko Roman
Last updated by: system APPLIES TO:

  • Plesk for Windows

Symptoms

Bind DNS server is used.
There is no entry in named.conf for some domain, there also no zone file for it in %plesk_bin%dns\var folder. If records are created manually they will be removed the next time Plesk updates named.conf.

Cause

There is wrong status in dns_zone table for this domain (it is configured to  2). If DNS for some domain is managed in Plesk Control Panel, the status for this domain in dns_zone table is temporary setting to value 2 (to lock it for any changes) and sets it to 0 value when the transaction is over. If for some reason the transaction is interrupted during DNS
managing (Plesk restarts for example) the status field value is not changed to 0 and stays as 2. Domains with that status value are not recorded in named.conf file during any DNS management.

Resolution

Check dns_zone records for problem domain (domain.com for example):

Example for MysQL (Jet)

select * from  dns_zone where name like 'domain.com';

If there is only one selected record, please change status field from 2 to 0.

Notice, that in case that there are several records, Plesk uses the first of them in numeral order. So it is necessary to check that this id does not belong to another domain and delete it in case it is orphaned:

delete from dns_zone where id=[wrong_record_id]

Otherwise set correct values to all fields.

Please apply following query to DNS zone record which belongs to problem domain:

update dns_zone set status=0 where id=[where id is numerical value
obtained from query 1]

Whn it’s done update DNS records using dnsmng.exe utility:

cd %plesk_bin%
dnsmng.exe update *

Dashboard preset used by user failed: DashboardPreset: unable to select: no such row in the table

Thursday, May 8th, 2008

Such problem may occurs if a domain has reference to custom dashboard presets that really does not exist. check it withthe following command in Plesk mysql database:
mysql>select d.name,d.id, dp.param, dp.val, P.id from domains d, dom_param dp left join DashboardPreset P on P.id=dp.val where dp.param=’custom_preset_id’ and d.id=dp.dom_id and P.id is NULL”
then
delete from dom_param where dom_id=number of domain from previous command