Archive for the 'cPanel Support' Category

SBDavid

How to extract a .war file

How to extract a .war file

If your hosting provider supports Tomcat, but not .war files, then you can extract .war file in your public_html folder to run your Tomcat application from there.

jar xvf file-name.war

How to Setup Reseller Private Nameservers in WHM

First we need to register the name servers before we set them up on the server.
Resellers can also have their own private name servers for their own clients making the server provider more anonymous.

Login to your WHM account as root.
Click on Reseller Center on the left hand side.
Under Edit Reseller Privileges/Nameservers, select the reseller account you want to provide with private name servers.
Scroll down to the very bottom of the page until you see: Primary Nameserver.

In the Primary Nameserver field enter the primary nameserver.
Click “Assign IP Address”
Click “Add an A Entry for this nameserver”
In the Secondary Nameserver field enter the secondary.
Click Save

mod_flvx FLV Progressive download streaming for Apache 2

If you are using cpanel server you should have already installed Apache. Make sure that you have apache 2.2 version on the server or else you might have errors during compiling mod_flv.

Download mod_flvx.c from http://github.com/osantana/mod_flvx

cd /usr/src

wget http://github.com/osantana/mod_flvx/blob/master/mod_flvx.c

Compile and install module:

/usr/local/apache/bin/apxs -i -a -c mod_flvx.c

Add the following handler in /usr/local/apache/conf/httpd.conf

AddHandler flv-stream .flv

Reload configuration:

service httpd restart

or

kill -1 `cat /usr/local/apache2/logs/httpd.pid`

Sometimes we may see the mysql database size as zero in cPanel

This can be fixed as follows: SSH to the server as root and edit the cpanel.config file

vi /var/cpanel/cpanel.config

search for

disk_usage_include_sqldbs=0

and then make change to

disk_usage_include_sqldbs=1

If the parameter is not present, add it. Save the file and execute the following command:

/scripts/update_db_cache

This may take few minutes to get fixed if you have a large number of users with databases, but once done, we should be able see the database disk usage show up accurately in cPanel.

How to include the crond service to chkservd

First we need to create a crond file under the chkservd.d directory where all the services files are placed:

vi /etc/chkserv.d/crond

Add the following line to the file:

service[crond]=x,x,x,/etc/init.d/crond restart,crond,root

Now we need to edit the chkservd configuration file and enable the crond service for monitoring

vi /etc/chkserv.d/chkservd.conf

add the following line at the end of the file

crond:1

Restart the chkservd service for the new changes to take affect:

/scripts/restartsrv chkservd

Stop the service manually and watch chkservd logs to verify auto-restart.

service crond stop; tail -f /var/log/chkservd.log

You should notice that the crond service is restarted automatically.

« Prev - Next »