Showing posts with label Plesk. Show all posts
Showing posts with label Plesk. Show all posts
0

Linux plesk: Unable to restore plesk domain dump using pleskrestore

Saturday, May 10, 2008

You need to extract the contents of domain dump first. The dump location can be found from psa.conf file (ex. DUMP_D /var/lib/psa/dumps).

cd /var/lib/psa/dumps/1/12 (here psa domain dump directory is /var/lib/psa/dumps/1/12)
mkdir recover
cd recover
zcat DOMAINNAME_2008.03.25_07-11-10 > DOMAINNAME_DUMP_FILE

The domain contents will be extracted here. You can move the contents to respective directories and give proper permission. If the content size greater than 2GB it will produce errors.

In that case we need to do the following steps:

Create a map file of the domain:

/usr/local/psa/bin/pleskrestore --create-map DOMAINNAME_DUMP_FILE -map map_DOMAINUSER

Find the client name of domain from PSA database.

mysql -uadmin -p`cat /etc/psa/.psa.shadow`
use psa
SELECT clients.login, clients.cname, clients.email, accounts.password FROM domains LEFT JOIN clients ON domains.cl_id = clients.id LEFT JOIN accounts ON clients.account_id = accounts.id WHERE domains.name ='DOMAINNAME';
+-----------+-------------------------+--------------------+----------+
| login | cname | email | password |
+-----------+-------------------------+--------------------+----------+
| mydomains | COMPANY_NAME | EMAIL_ID | jkhasdi |
+-----------+-------------------------+--------------------+----------+

Check the map_DOMAINUSER file. If the client name is empty in map file the domain dump restore will not happen.

Modify the map file map_DOMAINUSER:
Replace [] with client name. Here it is [mydomains]
Make sure that syntax of the mapfile is correct and IP properly mentioned in it.

Now you can restore the domain dump using "pleskrestore".

/usr/local/psa/bin/pleskrestore --restore DOMAINNAME_DUMP_FILE -level domains -filter list:DOMAINNAME -map map_DOMAINUSER

0

How to remove the advetisement option in the Plesk Top Bar

Wednesday, November 7, 2007

To remove the advertisement option from the Plesk, you need to edit the css\top\custom.css file.
For the Windows:
C:\Program Files\SWsoft\Plesk\admin\htdocs\skins\{SKINNAAM}\css\top\custom.css
For Linux Plesk :
/usr/local/psa/admin/htdocs/skins/{SKINNAAM}/css/top/custom.css

Comment the "topTxtBanner" in that file. After modification it will look like:
#topTxtBanner {
display: -moz-inline-box;
display: inline-block;
border-left: 1px solid #dce7ff;
background-image: url('../../images/vz_top.gif');
background-position: 9px 3px;
background-repeat: no-repeat;
padding-left: 36px;
padding-right: 7px;
text-align: left;
display: none; /** add this line **/
}

and
code:
#topTxtBanner a {
display: block;
display: none; /** add this line **/
white-space: nowrap;
}


Note: Replace the {SKINNAAM} by corresponding skin name.

0

Reseting Plesk admin Password

Reset Plesk’s admin password on windows Server :

Login to windows server via RDP as a administrator, then open command prompt and run following co
mmands :
C:\Program Files\SWsoft\Plesk\admin\bin\plesksrvclient.exe (according to plesk location)

or
cd %plesk_dir%
cd admin\bin

Execute this "plesksrvclient.exe", you will be prompted to enter the new password for your “admin
” plesk user.

You can then log into the plesk interface again and use as normal.


Reset Plesk’s admin password on LInux Server :

Login to Linux server as root, and run following commands :
cd /usr/local/psa/admin/bin
export PSA_PASSWORD='newpassword'
echo $PSA_PASSWORD
./ch_admin_passwd
export PSA_PASSWORD=
cat /etc/psa/.psa.shadow

0

You can find out the main FTP user login details from the psa database of the Plesk. Using the following queries you can obtain the main FTP login details of the domain.

This following queries are used for Linux Plesk.
mysql -uadmin -p`cat /etc/psa/.psa.shadow`
mysql> use psa
mysql> select id from domains where name='EnterTheDomainName';
select * from hosting where dom_id='1'\G;


Note: You need to add an extra field for port '-P8306' along with mysql command to connect to the windows mysql. Also you need to exactly specify the mysql password instead of cat /etc/psa/.psa.shadow

0

Delay in sending mail

add: "-Rt0" to the 'server_args' on file: /etc/xinetd.d/smtp_psa just like :
server_args = -Rt0 /var/qmail/bin/relaylock.....


Then restart xinetd:
# /sbin/service xinetd restart
Under PLESK control panel, go to SERVER -> Services: MAIL
Check this:
Mail Names for POP3/IMAP accounts:
--> Only use of "compound" POP3/IMAP mail accounts names is allowed
(that will force you to use "mailname@domain.ext" as username on email-client's
"server configuration" when checking mail)

0

File manager of the domain (Plesk control panel) produced the following error, while accessing it . Internal Plesk error occurred: filemng failed:

File manager of the domain (Plesk control panel) produced the following error, while accessing it
.
Internal Plesk error occurred: filemng failed: filemng: stat failed

The fix is very simple.

Check the permission of the root directory (/var/www/vhosts/domainName) of the domain (ex.domainN
ame).

Modify the permission to 755.

This will fix the issue.

0

How to Modify "Changing password on this server" to corresponding name in Horde

If you would like to see "Changing password on domainName" instead of "Changing password on this
server, this can be done by replacing the following line in the backends.php. The path will diffe
r according to the horde setting.
$backends['poppassd'] = array('name' => 'poppasswd server',

with
$domain = substr($_SERVER['SERVER_NAME'], 8);
$backends['poppassd'] = array(// 'name' => 'poppasswd server','name' => $domain,


In my case it is /etc/psa-horde/passwd/backends.php

0

Plesk links (such as domains, Clients) are not working - due to session.save path

While clicking the links such "domains","clients" in the Plesk, the following error message will display:
Browser has detected that the server is redirecting the request for this address in a way that will never complete.
* This problem can sometimes be caused by disabling or refusing to accept cookies.

The issue is occurring due to the session.save_path in the php.ini file of plesk.

Fix:
First check whether the session.save_path is not commented in the plesk php.ini (/usr/local/psa/admin/conf/php.ini)

Specify the exact path to session dir in the session.save_path of /usr/local/psa/admin/conf/php.ini.
session.save_path = ""
/etc/init.d/psa restart


Note: Replace the by corresponding value.

0

How to Improve default bounce behaviour

By default, Plesk does not handle double-bounces gracefully. To throw away double bounces (the bo
unces that cannot be delivered) using the following :


Find the path of QMAIL_ROOT_D from the /etc/psa/psa.conf

Enter the # in QMAIL_ROOT_D/control/doublebounceto file

(ex.If the QMAIL_ROOT_D is /var/qmail/, then it will be echo "#" > /var/qmail/control/doublebounc
eto)

/etc/init.d/xinetd restart

0

Changing the page title for the login screen

You can change the title for the control panel login screen.
cd /usr/local/psa/admin/htdocs/javascript
cp common.js common.js.orig


open common.js with your text editor and at the top of the page add this:
document.title = '**WHAT EVER YOU WANT**';

Save the file, browse to your control panel and the browsers title bar should now reflect what yo
u wanted for the title.

0

Error Cannot exec 'spammng'

Error Cannot exec 'spammng'

The error will look like "Cannot exec 'spammng......'":

Solution:
cd /usr/local/psa/admin/bin
rm spammng
(make sure spammng is not present)

then create the symlink
ln -s ../sbin/wrapper spammng

Use the listing command to make sure the symlink is correct.
ls -la spammng

0

Delay when connecting to FTP

If there is any delay in connecting the Plesk FTP, edit your proftpd.conf (somewhere above the automatic Plesk comment warn you)
UseReverseDNS off
IdentLookups off
restart using /sbin/service xinetd restart

0

Plesk login looping

When visiting https://domainorip:8443 you are redirected to the login page infinitely.

Reason: 'undefined variable PHP_SELF' that isn't passed while register globals is off.

Solution:
Edit the php.ini and modify register_globals = On.

I did this fix on VPS Plesk.