Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: Modify Bandwidth Exceeded Page  (Read 3693 times)

0 Members and 1 Guest are viewing this topic.

sajugovind

  • Guest
Modify Bandwidth Exceeded Page
« on: August 10, 2014, 07:59:54 pm »
Learn how to modify the CPanel bandwidth exceeded page when a clients site uses all their bandwidth up.
In this tutorial you will learn how to modify the Cpanel bandwidth exceeded page. This page is shown for clients automatically when they run out of bandwidth. Bandwidth counts are reset every month.

Step 1: Login to the server as root in SSH.

Step 2:  This will make a backup copy of the original file incase you need to revert back

cp /usr/local/cpanel/apache/mod_bwlimited.c /usr/local/cpanel/apache/mod_bwlimited.c.bak

Step 3: Then type:

pico -w /usr/local/cpanel/apache/mod_bwlimited.c

Scroll down until you reach the section where you'll see the HTML code for the bandwidth page or do a search for it in Pico #: Ctrl+W   then paste this in: <HTML><HEAD>n<TITLE>509 Bandwidth Limit Exceeded</TITLE>

Change it to whatever you like... carefully.

Step 4: Save the file while still in pico #:

Crtl+X then Y

Some cases you couldnt find mod_bwlimited.c under /usr/local/cpanel/apache/ , dont worry. Below steps will help you.

vi /home/cpeasyapache/src/mod_bwlimited.c

Then find the line with the 509 Bandwidth Limit Exceeded, Change it as you wish.

 press esc key then type :wq

Now, let us compile the mod_bwlimited.c using apache’s apxs tool.

/usr/local/apache/bin/apxs -iac mod_bwlimited.c

The module will be automatically copied and installed after compilation if all went well. If any case after the code compilation you got an error that it cannot copy or install the module because the file is busy, then remove the old mod_bwlimited.so module first.

rm /usr/local/apache/modules/mod_bwlimited.so

then re-compile mod_bwlimited.c.

After the installation, don’t forget to restart the apache service.

service httpd restart

If you got a warning message that it is skipping to load the module because it was already loaded, then modify your httpd.conf file and remove the duplicate loading line and restart the apache service. Everything should be working fine now.

Cheersss.....