Archive for the ‘plesk’ Category

I cannot access the webstats for some of my domains via HTTP://, even though the webstat directory is present in their domain.

May 10, 2008

I cannot access the webstats for some of my domains via HTTP://, even though the webstat directory is present in their domain.
RESOLUTION

The short answer is: if SSL is enabled for a domain, stats can only be accessed via HTTPS. If SSL is disabled, statistics is accessible via HTTP.

The detailed answer: since PSA 5.0 release the entire statistics process has been changed. Webstat directory was moved from httpdocs to the domain root, and it is now aliased in apache. The problem with this, is that directories in the domain root are not specific to http or https. So, in theory, these could be accessed by both. However, in order to be able to password protect the webstat directories, they must be defined as either http or https. To facilitate this, we made the alias point to HTTP for all domains without SSL, and point to HTTPS for domains with SSL enabled.

How can traffic statistics be updated for a particular domain name only?

May 9, 2008

How can traffic statistics be updated for a particular domain name only?
RESOLUTION

Usually when Plesk updates traffic statistics it performs update for all the domains hosted on the server. Since Plesk 7.5 if statistics need to be updated for one domain only you can use the following command line:

/usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=Domain_name.com
Keywords: one domain statistics

Webstat for all domains shows the same values

May 8, 2008

Webstat for all domains shows the same values.
RESOLUTION
The following default variables/lines in /etc/webalizer.conf file must be commented out, otherwise they override webalizer preferences specified for each domain in vhosts/domain.com/conf/webalizer.conf:

# LogFile /var/log/httpd/access_log
# OutputDir /var/www/usage
# HistoryName /var/lib/webalizer/webalizer.hist
# IncrementalName /var/lib/webalizer/webalizer.current
# DNSCache /var/lib/webalizer/dns_cache.db
# Quiet yes

Webalizer reports no traffic usage for my domains and the statistics seem to be out of date.

May 7, 2008

Webalizer reports no traffic usage for my domains and the statistics seem to be out of date.
RESOLUTION
Statistics in Plesk is counted by means of the /usr/local/psa/admin/sbin/statistics utility, which is run by cron every day.

In Plesk 8 and previous versions cron job for statistics is placed in the ‘root’ user crontab:

7 4 * * * /usr/local/psa/admin/sbin/statistics >/dev/null 2>&1

Since Plesk 8.1 it is located in /etc/cron.daily/50plesk-daily:

/usr/local/psa/admin/sbin/statistics >/dev/null 2>&1

So, make sure that statistics cron job exists and crond is running:

# ps -ax | grep crond | grep -v grep

and check cron logs (/var/log/cron) for records about the statistics utility executions.

Also, you can try to run the utility manually and look for errors. Make sure that there are no apache logs bigger than 2 GB. It may cause webalizer to fail.

Make sure that all database directories in $MYSQL_VAR_D (usually /var/lib/mysql) have read/write permissions to ‘mysql’ user.

Web statistics is not calculated. When I run ’statistics’ or ‘webalizer’ manually, I get “db_put fail!” error.

May 6, 2008

Web statistics is not calculated. When I run ’statistics’ or ‘webalizer’ manually, I get “db_put fail!” error.
RESOLUTION

If you get the following error when try to run ’statistics’ utility:

# /usr/local/psa/admin/sbin/statistics –calculate-all
Webalizer V2.01-10 (Linux 2.6.9-34.0.2.ELsmp) English
Using logfile STDIN (clf)
DNS Lookup (15): db_put fail!

It means that /usr/local/psa/var/lib/webalizer/webalizer.cache or /var/lib/webalizer/dns_cache.db files were damaged or exceeded 2GB. These files are used by ‘webalizer’ to cache DNS queries when it resolves IPs from access_log requests to Apache came from. Remove the file and run ’statistics’ again.

If you don’t need to resolve IPs or statistics you can disable it by commenting DNSCache and DNSChildren directives in /etc/webalizer.conf and /var/www/vhosts/DOMAIN.TLD/conf/webalizer.conf files.

None of the icons are shown up on the AwStats stats pages

May 5, 2008

None of the icons are shown up on the AwStats stats pages.
RESOLUTION

This problem fixed in Plesk 8.1.1 Until Plesk 8.1.1 release you can modify AwStats configuration files with:

sed -i ’s,^DirIcons=.*,DirIcons=\”/awstats-icon\”,’ /etc/awstats/*.conf /usr/local/psa/etc/awstats/*.conf

After next statistics utility execution by cron the icons will be shown up correctly.
Keywords: icons images awstats missing no stat

I have Apache access_log file, is it possible to generate Webalizer statistics for this log manually?

May 4, 2008

I have Apache access_log file, is it possible to generate Webalizer statistics for this log manually?
SYMPTOMS
I have Apache access_log file and want to calculate Webalizer statistics for this log.
RESOLUTION
To generate Webalizer statistics ‘webalizer’ should be run with this domain parameters as on example below:

# cd $VHOST_CONF_D/domain.tld/statistics/
# mkdir webstat_new
# webalizer -F clf -p -c ../conf/webalizer.conf -n domain.tld -o ./webstat_new -D /usr/local/psa/var/lib/webalizer/webalizer.cache -N 50 ./logs/access_log

In result of the commands above, statistics for domain ‘domain.tld’ will be generated in ‘./webstat_new’ folder accordingly to information in the “./logs/access_log”.

If you have several logs, for example:

access_log.processed.1
access_log.processed.2
access_log.processed.3

run the ‘webalizer’ command for every log file in the reverse order (begining from the oldest one): access_log.processed.3, access_log.processed.2, access_log.processed.1.

How do I limit the maximum children for spamd? For if there is a large spam attack – too many processes are started and the system can run out of resources.

May 3, 2008

How do I limit the maximum children for spamd? For if there is a large spam attack – too many processes are started and the system can run out of resources.
RESOLUTION
In Plesk 7.5 and 8.0 you can limit the number of simultaneously running SpamAssassin processes with ‘SPAMASSASSIN_MAX_CHILDREN’ option in /etc/psa/psa.conf:

SPAMASSASSIN_MAX_CHILDREN 5

You can specify a desired value then restart psa-spamassassin.
If the line is omitted then the default value is 20 for SpamAssassin 2.6 and 5 for SpamAssassin 3.x.

Since Plesk 8.1 SPAMASSASSIN_MAX_CHILDREN option is obsoleted but this value can be managed through Plesk CP. Use “The maximum number of worker spamd processes to run (1-5)” on the Settings tab of Server>SpamFilter page. The value is stored in psa.misc table (param=’spamfilter_max_children’).

SpamAssassin cannot be started: “Unable to make action: Unable to manage service by spamd: Empty error message from utility”

May 2, 2008

SpamAssassin cannot be started: “Unable to make action: Unable to manage service by spamd: Empty error message from utility.”
RESOLUTION

Full error message:

Unable to make action: Unable to manage service by spamd: Empty error message from utility. 0: /usr/local/psa/admin/htdocs/server/restart_services.php:19 psaerror(string “Unable to make action: Unable to manage service by spamd: Empty error message from utility.”)

Try to start psa-spamassassin from the command line:

/etc/init.d/psa-spamassassin start
Can’t locate Text/Iconv.pm in @INC (@INC contains:
/usr/local/lib/perl5/5.8.7/i686-
linux /usr/local/lib/perl5/5.8.7
/usr/local/lib/perl5/site_perl/5.8.7/i686-linux
/usr/local/lib/perl5/site_perl/5.8.7 /usr/local/psa/lib/perl5/5.8.7
/usr/local/psa/lib/perl5/5.8.7/i686-linux
/usr/local/psa/lib/perl5/site_perl/5.8.7/i686-linux
/usr/local/psa/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.0
/usr/local/lib/perl5/site_perl) at
/usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/CmdManage.pm line 8.
BEGIN failed–compilation aborted at
/usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/CmdManage.pm line 8.
Compilation failed in require at /usr/local/psa/admin/sbin/spammng line 71.

This error means that there is something wrong with Perl itself because it cannot find all needed modules. Make sure that all RPMs required for ‘Spamassassin’ are installed.

Check Perl version:

perl -v
rpm -q perl

And package integrity with the command:

rpm -V perl

Reinstall Perl RPM if versions which are shown by these commands don’t match or integrity test shows any errors.

I installed some additional language pack(s) and found out that my Plesk key doesn’t support such amount of LPs. It doesn’t let me to login to the interface. What can I do?

May 1, 2008

I installed some additional language pack(s) and found out that my Plesk key doesn’t support such amount of LPs. It doesn’t let me to login to the interface. What can I do?
RESOLUTION

You can remove unnecessary language packs using utility /usr/local/psa/bin/lp_manage.sh.

Note: Since Plesk 7.5 language packs are managed through Plesk CP.