Archive for the ‘Plesk’ Category

Plesk remove chroot for domain

December 9th, 2011 Comments off

I haven’t found the way how to disable creating chroot-folders on webspace with new domain creation.

So, on Parallels forum support offered me to create Event manager handler.

Open Plesk -> Tools & Settings -> Event Manager -> Add New Event Handler

Fill the form:


Default domain (the first domain added to a subscription/webspace) created

highest (100)


/usr/local/psa/admin/sbin/chrootmng –remove –source=/var/www/vhosts/chroot –target=/var/www/vhosts/${NEW_DOMAIN_NAME}

This handler will remove chroot from newly created domain immediately.

Categories: Plesk Tags: , ,

Plesk disable quotas check during upgrade

November 24th, 2011 Comments off

You can disable it by setting the following environment variable prior to the installation
or upgrade:


Of course this will work only if you run the process in the same shell, thus, it can’t be
set for GUI upgrader.

KB Parallels: During an installation/upgrade file system quotas check takes way too much time, can I disable it?.

Categories: Plesk Tags: ,

Plesk: Real memory usage reported by ‘Server Health’ does not match actual RAM

August 29th, 2011 Comments off

Real memory usage reported by Plesk Health Monitoring Service (Home > Server Health > Memory) does not match RAM reported by utility ‘free‘.

RAM was updated after Parallels Plesk Panel was installed.
Plesk Health Monitor does not detect if the system configuration was changed after the initial installation.

The problem will be fixed in future update of Parallels Plesk Panel that will be released after version 10.2.

To workaround:

# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/scripts/setup-health-monitor.php
Categories: Linux, Plesk Tags: , ,

Plesk FTP account passwords

May 5th, 2011 Comments off

Open phpMyAdmin or mysql command line client, choose database pma and execute query:

USE psa;
SELECT REPLACE( sys_users.home, '/var/www/vhosts/', '' ) AS domain, sys_users.login, accounts.password
FROM sys_users
LEFT JOIN accounts ON sys_users.account_id =
ORDER BY sys_users.home ASC

It will show you all FTP users from Plesk

Categories: MySQL, Plesk Tags: , , ,

Linux upgrade from i386/i686 to x86_64

April 1st, 2011 1 comment

This article describes upgrade CentOS 5.5 from i386 arch to x86_64 arch.

First of all, upgrade kernel and boot loader from CD. For my system this operation was done by hosting provider.

After kernel upgrade system have a lot of i386/i686 packages. It isn’t possible to upgrade each package manually. For example, my CentOS had 300+ packages.

To continue you need to install yum

The algorithm of upgrading is simple:

  1. install for each i386/i686 package its x86_64 analogue
  2. erase i386/i686 packages

But it can be complicated, because any packages uses the same paths or something else and you need manually to install RPMs.

Let’s begin.

Install yum plugin yum-downloadonly:

yum install yum-allowdowngrade

Then take a list of packages for upgrade:

rpm -qa --qf "%{name}.%{arch}\n" | grep -E "i386|i686"

Copy this list into your text editor and replace “.i386” and “.i686” with “.x86_64”. Also replace all returns with spaces. You will take something like this:

glibc.x86_64 readline.x86_64 ncurses.x86_64

Now download this packages RPMs:

yum install --downloadonly --downloaddir=/root/rpms/ <packages>

where <packages> are in my example glibc.x86_64 readline.x86_64 ncurses.x86_64

Of course directory/root/rpms/ must exist.

When yum finishes to download hundreds of packets, chdir to /root/rpms/ and execute

rpm -i --force *.rpm

rpm will force installation of all downloaded packages.

After installation you need come back to your i386/i686 packages list and uninstall them.

yum erase <packages>

where <packages> are in my example glibc.i686 readline.i386 ncurses.i386

That’s all!

Categories: Linux, Plesk Tags: , ,

Parallels Plesk license key location

March 22nd, 2011 Comments off

Plesk license key is located:

1. Parallels Panel 7.x – 8.x:

2. Parallels Panel 9+:

Categories: Plesk Tags: ,

Proftpd passive mode hangs or works slow

February 9th, 2011 Comments off

There is 2 steps.

First of all, add to /etc/proftpd.include followed code:

TimeoutIdle                 900
TimeoutNoTransfer           900
PassivePorts                49152 65534
TimesGMT                    Off

Then test the iptables nat helper:

modprobe ip_conntrack_ftp

If there is no errors, add to directive IPTABLES_MODULES in /etc/sysconfig/iptables-config module ip_conntrack_ftp:


If you need to load two or more helpers, separate them with spaces because the iptables script does a for-in on the IPTABLES_MODULES directive.

Categories: Linux, Plesk Tags: , , , ,

Plesk: Premature end of script headers OR cgi_wrapper target uid/gid mismatch (500 Internal server error)

January 24th, 2011 1 comment

When you have a newly installed Plesk, it’s not enought to run PHP-scripts in CGI. Unfortunately.

You need manually copy suexec file from Plesk binaries file folder to system binaries folder.

In common cases it does command:

# cp /usr/local/psa/suexec/psa-suexec /usr/sbin/suexec

If cp cannot find any of files, search they manually

# locate suexec

Important! It’s recommended to make a copy of system’s suexec file

# cp /usr/sbin/suexec /usr/sbin/suexec_old
Categories: Linux, Plesk Tags: , , , ,

Parallels small business panel. How to disable mail for domain

December 19th, 2010 1 comment

I’ve needed to allow for my domain only hosting without mail service. Mail server will be remote. I’ve changed MX-records to remote server IP (or hostname), but it’s not enough. Also this domain must be removed from mail daemon (Qmail, Postfix or other) config files.

There is no possibility to disable mail service for domain via Small business panel. You can only do it via command line.

#/usr/local/psa/bin/domain -u <domain> -mail_service false

Additionally, if you want to set option “What to do with mail sent to nonexistent users” to “Forward to address”, you need than manually edit


with command

postmap -d @<domain> hash:virtual
Categories: Mail, Plesk Tags: ,

Plesk AWStats view statistics for all domain

June 8th, 2010 Comments off

By default in Plesk you can view AWstats statistics for each domain separately at http://<yourdomain>/webstat . And you must type here FTP password for the domain. It’s not comfortably when your server holds much more than one domain.

So, our task is to create superadmin-access for AWStats for viewing all domains statistics with only one password.

First of all, find you file. It must be located in cgi-bin directory which lies near your vhosts. In my case it’s /srv/www/cgi-bin

Put here 2 files:


AuthUserFile /srv/www/cgi-bin/.htpasswd
AuthName "AWStats"
AuthType Basic
require valid-user


use strict;
use warnings;

use CGI qw(:standard);

print header;
print start_html(-title => 'AWStats');

opendir (DIRH, '/usr/local/psa/etc/awstats') || die; # path depends on your system

print '<div align="center">';

my $file; my @files;
# awstats config files are named like awstats.<yourdomain>-http.conf
# if you need to see also ftp etc, modify my code
while ($file = readdir DIRH) {
 $_ = $file; # my perl doesn't works without assignment result of readdir
 next unless m/\-http\.conf$/;
 push @files, $file;

for $file (sort @files) {
 $_ = $file;
 print "<a target='_blank' href='",$_,"'>";
 print '</a><br>';

print "</div>";

Don’t forget to chmod +x

To finish with this dir, create .hpasswd file:

htpasswd -c .htpasswd <username>

At last you need to config Apache web-server.

Put in /etc/apache2/conf.d/awstats.conf (or create a new one):

ScriptAlias /awstats-full /srv/www/cgi-bin
Alias  /awstats-icon /usr/share/apache2/icons/awstats

<Directory /srv/www/cgi-bin>
 AllowOverride All

Please check all paths, they are depend on your system. For exampe, apache config dir may be /etc/httpd/

Finally, restart Apache graceful (recommended)

apachectl -k graceful

or restart fully

apachectl -k restart

Now you can see all domain statistics on http://<your ip>/awstats-full/

Categories: Linux, Plesk Tags: , , , ,