HolHost.com Blog Server administrators blog

23Nov/15Off

Why cPanel AWStats is Not Updating Automatically?

AWStats is one of the maximum usually using cPanel tool to analyse internet site site visitors summary. you may analyse loads of factors from here like range of visits, Pages, Hits, Bandwidth and so on. In some extraordinary conditions, you can get this problem with AWStats, it’s not updating mechanically. There are a variety of reasons at the back of this hassle including document permission. here I’m listing a few points to check if you acquire this problem with AWStats.

Awstats location:
You can simply access and analyse this from the cPanel itself. Please do follow the steps:

1, Log into cPanel.
2, Move to;

Logs >> AWStats

How to update AWStats manually?

You can do this from cPanel and also from the command line. You must have root access to server. You can do this:

1, SSH to server as root.
2, Execute:

/scripts/runweblogs $user-name

Why AWStats is not updating automatically?

1, SSH to server as root.

2, Change the directory to:

/home/user/tmp/awstats

There are the conf files for domains under that particular cPanel account. We need to make sure that the directive “AllowToUpdateStatsFromBrowser” is set to 1.

grep AllowToUpdateStatsFromBrowser awstats.example.com.conf

Example:

root@tsting [/home/****/tmp/awstats]# grep AllowToUpdateStatsFromBrowser awstats.servernoobs.com.conf
# Warning: If you want to be able to use the "AllowToUpdateStatsFromBrowser"
AllowToUpdateStatsFromBrowser=1

Also please check the permission of “/usr/local/cpanel/3rdparty/bin/awstats.pl” file. It must be 775.

# ll /usr/local/cpanel/3rdparty/bin/awstats.pl
-rwxrwxr-x. 1 root root 679172 Aug 23 2009 /usr/local/cpanel/3rdparty/bin/awstats.pl*

You can see our VPS Plans.

2Oct/15Off

How to install Memcache and Memcached on WHM/cPanel

Hello,
Without wasting much time, Let us get started!

Follow these simple instructions to install Memcache and Memcached:

Step 1: Login into your WHM panel and using easyapache enable Memcache (you must recompile apache)

Step 2: SSH into your server and fire this command:
yum install memcached.x86_64 php-pecl-memcache.x86_64

Step 3: Go to Software -> Module Installers -> PHP Pecl, Search for memcache and then install both memcache & memcached

Step 4: Restart apache once, Fire: service httpd restart

Step 5: Start memcache by firing this command: memcached -d -m 512 -l 127.0.0.1 -p 11211 -u nobody
(d = daemon, m = memory, u = user, l = IP to listen to, p = port)

Step 6: Check your memcached server is running successfully: ps -eaf | grep memcached

All Done! If everything goes good, You should now be able to use memcached within your application.

Enjoy Caching!

8Apr/13Off

make: *** [ffmpeg_frame.lo] Error 1 – error when installing ffmpeg-php

If you're obtaining the subsequent error whereas aggregation the most recent unharness of ffmpeg-php-0.6.0 , this article will allow you to savvy to induce this fix.

Error:

/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function âzim_ffmpeg_frame_toGDImageâ:
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: âPIX_FMT_RGBA32â undeclared (first use in this function)
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function âzim_ffmpeg_frame_ffmpeg_frameâ:
/usr/src/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: âPIX_FMT_RGBA32â undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1

Solution:-

Under the ffmpeg-php-0.6.0 directory modify the file: ffmpeg_frame.c with nano or vi editor and replace every instance of PIX_FMT_RGBA32 with PIX_FMT_RGB32

# nano ffmpeg_frame.c
# Search for PIX_FMT_RGBA32 and replace it with PIX_FMT_RGB32
# Exit from the editor

Then run the following commands:

# cd /usr/local/src/ffmpeg-php-0.6.0
# cp -aP ffmpeg_frame.loT ffmpeg_frame.lo
# make clean
# ./configure
#   make
#   make install

This should fix the errors given above. Finally add the ffmpeg.so extension in php.ini and check phpinfo for the server you should see ffmpeg listed.

12Feb/13Off

How to install CSF

Hello,

We'll guide you thru putting in and configuring CSF - Config Server Firewall, a preferred different to APF. CSF comes with LFD and works with or while not cPanel.

CSF Install Guide and the way To

CSF - Config Server Firewall could be a stateful packet scrutiny firewall, login/intrusion detection and security application for UNIX operating system servers. What will that mean in English? straightforward - it is a program that may greatly improve your dedicated server or VPS's security.

It's a firewall - therefore it will block/restrict ports you do not wish open, and prevents somebody from exploitation any port they require if they did break in.
It has intrusion detection - therefore it'll scan the log files and monitor failing login tries, like FTP word shot and block the science.
Those area unit the two massive things i favor concerning CSF - and it's a pleasant interface for the non tekki person, on cPanel servers.

http://www.configserver.com/cp/csf.html

If you've got another firewall put in, like APF, CSF will assist you mechanically take away the present firewall and install theirs instead. detain mind it will not migrate over your configuration.

Installation
============
Installation is kind of straightforward:

Login because the root user to SSH and run the subsequent commands.

rm -fv csf.tgz
wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

If you'd wish to disable APF+BFD (which you may ought to do if you've got
them put in otherwise they'll conflict horribly):

sh disable_apf_bfd.sh

That's it. you'll then tack csf and lfd in WHM, or edit the files
directly in /etc/csf/*

Installation Completed

Don't forget to:

1. tack the TCP_IN, TCP_OUT, UDP_IN and UDP_OUT choices within the csf configuration to suite your server

2. Restart csf and lfd

3. Set TESTING to zero once you are pleased with the firewall

csf is preconfigured to figure on a cPanel server with all the quality cPanel
ports open. It conjointly auto-configures your SSH port if it's non-standard on
installation.

You should make sure that kernel work daemon (klogd) is enabled. Typically, VPS
servers have this disabled and you ought to check /etc/init.d/syslog and build
sure that any klogd lines aren't commented out. If you alter the file,
remember to restart syslog.

Now - login to your cPanel server's WHM as root and attend the lowest left menu. If already logged in then reload the page. In Plugins - you may see:  ConfigServer Security&Firewall

The firewall is STOPPED by default - it's not running. we want to designed it, so take it out of check Mode.

Click on Firewall Configuration

ETH_DEVICE =: Set this to eth+

TCP_IN/TCP_OUT/UDP_IN/UDP_OUT = : These area unit the ports you would like to go away open for your server to work. If you alter the default SSH port confirm to feature it here. conjointly add the other services you would possibly have running like Shoutcast or game servers. By default most of the ports used ought to already be designed.

MONOLITHIC_KERNEL = : zero solely amendment this to one if your firewall won't begin - otherwise leave it because it.

LF_DSHIELD = 0: amendment this selection to 86400. this is often associate automatic updated list of acknowledged offensive IPs. sanctioning this can stop them from having the ability to attach to your server.

Spam Protection Alerts
If you would like to feature some spam protection, CSF will facilitate. Look within the configuraiton for the following:

LF_SCRIPT_ALERT = zero amendment this to one. this can send associate email aware of the supervisor once the limit designed below is reached among associate hour.

LF_SCRIPT_LIMIT = one hundred amendment this to 250. this can warn you once associatey scripts sends out 250 email messages in an hour.

Configuration Complete - nearly
Scroll right down to the lowest and click on on amendment to save lots of the settings. Then click Restart csf+lfd

You should see an enormous page of settle for and close to the lowest you ought to see:

csf: TESTING mode is enabled - remember to disable it within the configuration
Starting lfd:[  OK  ]

Click on come back

Now check all of your services to create positive everything is functioning - SSH, FTP, http. once you are doing a couple of fast tests return into the Firewall Configuration page.

TESTING = one amendment this to zero and click on amendment at the lowest. Then Restart csf+lfd

That's it, the firewall is with success put in and running!!
Firewall Status: Running - you ought to see this on the most CSF page in WHM.

Uninstallation
==============
Removing csf and lfd is even a lot of simple:

cd /etc/csf
sh uninstall.sh