Contact Support : +64 220 256 070

Aimvm
Blog

How to enable CDN on your server?

Posted on: October 1, 2014

A (CDN) Content delivery network is a server network spread across the globe that deliver content to a user based on the geographic location of the user. The most commonly used CDN on cPanel server is Cloudaflare. In this lesson we will see how cloudflare can be installed on your server.

Steps:

1) Access the server via SSH.

2) Execute the following commands: 

cd /usr/local/cpanel
curl -k -L https://github.com/cloudflare/CloudFlare-CPanel/tarball/master > cloudflare.tar.gz
tarzxvf cloudflare.tar.gz
The extraction of the of cloudflare.tar.gz will show a unique id directory as mentioned below.
cloudflare-CloudFlare-CPanel-2a3f93c
Each installation of Cloudflare is given a separate id and known as Unique Identity(UID). In our case ‘2a3f93c’ is the unqiue ID.

1a

cd cloudflare-CloudFlare-CPanel-UNIQUE_ID/cloudflare

You need to get a key called ‘API_HOST_KEY’ from the Cloudflare to complete the installation. You can get it by contacting their support. Once you get the key you can proceed wi th the installation as mentioned below.
./install_cf API_HOST_KEY mod_cf “Your Company Name”

 

Now you have successfully installed Cloudflare. You will get a prompt with confirmation of the installation.

If you get the following error, it means your key is invalid, you should contact cloudflare support for getting  a new API HOST KEY.

Your HOST_KEY (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) is invalid.

Usage: ./install_cf HOST_KEY [mod_cf] [formal name].

If you do not have a HOST_KEY, contact CloudFlare for one before proceeding.
mod_cf is optional. If set, the installer will try to also install mod_cloudflare.

 

 

 

Search Blog