cpanel/WHM Log rotate FIX

Fixing Log Rotation Problems

Since installing cpanel on some of our server, we noticed the logs in /usr/local/apache/logs/* growing out of control without ever being rotated. In /etc/logrotate.d the script called "httpd" is the reason why. Its totally wrong. Its looking for files located in /var/log/httpd/ and that is not where my log files are located. In fact, we dont even have files in this directory. Its completely empty.

Tags: Cpanel / WHM

Preventing Brute Force Attacks


Blocking and preventing brute force attacks is one of the main things you want to do on your web server to add a layer of security. While someone might not be targeting your site or server specifically, they will have automated tools that will try to guess random usernames and passwords that are common against your system. They’re essentially forcing their way to user only authorized area’s of a system, such as FTP accounts, e-mail accounts, databases, script based administration areas and root or any shell access are most common attempts. They will try multiple login attempts, guessing usernames and passwords, trying to force their way onto your machine.

Tags: Linux

Introducing LAMP Tuning Techniques

Published on (
 See this if you're having trouble printing code examples

by Adam Pedersen

I'm getting to know far more about servers than I ever wanted to, after hundreds of hours of Google research trying to squeeze/beat performance out of Apache. I do have 15 years programming experience in other areas, and I've reached the conclusion that the only experts in Apache/Linux are the programmers who wrote (and poorly documented) all this stuff. So I've gathered everything I could learn after countless hours of frustration and I'm writing this up in return for the immense amount of help I've received from the documentation of others.

Tags: Linux

DNS setup (more info)

This is a combination of posts I have used in the past and have adapted to provide an excellent DNS solutions.

The prerequisites for this are just Two Servers and in this implementation 4 IP's(2 per server) as it makes it more understandable. Also you will require a web accessible domain on each server.

Basically it will allow you to use a combination of two servers to do your DNS for you one being the primary and one the secondary. You could use this for every two sets of servers you own OR possibly adapt it so that all your servers use just the two sets.

It is my intention to eventually use this solution so that DJBDns is used instead of Bind because it is so flakey and buggy in my opinion.
DJB has a $500 reward for any exploits discovered thats how good it is!

Anyway enough chat lets get down to business....................

What we are aiming for is the following set up


Tags: Linux

How to setup DNS on Ensim

HOW-TO: Setting up Nameservers w/o Using Primary Server IP
There have been a number of threads with various bits and pieces of this process, but I haven't seen the entire thing in one place, so here goes. As always, modifying your server is done at your own risk and I accept no responsibility for anything that may happen.

Tags: Cpanel / WHM

Setting up Private Nameservers in Cpanel

This guide will show you the ropes in how to setup cpanel nameservers and configure them properly so you can run ns1 and Once your nameservers are setup clients can then use your own private nameservers for their domains.

1. Regiser your domain
Register the domain name you would like to use, you can register a domain here if you need one.This domain will be used as your nameservers - eg and

2. Additional IPs
Have 2 available IP addresses for your server that aren't in use.You will need to contact you provider to obtain these IP addreses.

3. Registering the Nameservers  
Now login to your domain management page for the domain you registered and  register and as nameservers (registries normally have a special facility for doing that). The registry may also have a facility to propogate these nameservers around the foreign registries - if so, you should use this facility.

Tags: Cpanel / WHM

Properly Reject Invalid Email

Tired of seeing your mail queue fill up with bounce messages to non-existant spammer email addresses? By default, if an email comes into your server addressed to an invalid recipient, Exim will accept the message from the delivering agent, and then generate a return email to them explaining that the address is invalid. With this little tweak, you can make exim tell the delivering agent that that address is invalid at the time the message is being delivered, meaning no more spam returns cluttering up your queue! Can I get an Amen!? Read on!
Tags: Cpanel / WHM