Posts Tagged ‘Directory’

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: , ,

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 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: , , , ,

Find all large files in Unix / Linux using shell prompt

August 31st, 2009 Comments off

In Linux there is a problem to measure all folders and subfolders.

You can find all large files (in this example bigger 600 000 kb and from root folder) from shell prompt with command:

find / -type f -size +600000k -exec ls -l {} \; | awk '{ print $9 ": " $5 }'
Categories: Linux Tags: , ,