Skip to content

codyro/CloudFlare-CPanel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CloudFlare plugin for CPanel.

Requires: 

 * Net::SSLeay
 * Simplezoneedit or Zoneedit features

Provides access to the CloudFlare service. Learn more about CloudFlare at cloudflare.com.

First, acquire a host api key from CloudFlare. 

Install (as root):

./install_cf HOST_API_KEY [mod_cf] [Provider Name]

This works for the default theme and locale. Other themes or locales may require custom work. 
Replace HOST_API_KEY with your api key. Adding the string mod_cf will also install the Apache 
extension mod_cloudflare on the local server. More information is available here: 
https://github.com/cloudflare/CloudFlare-Tools.

Edit API key:

If you need to, update your API key by editing the file /usr/local/cpanel/etc/cloudflare.json, updating 
the value host_key.

Edit CloudFlare prefix:

After having been routed through the CloudFlare network, if the traffic is clean and cannot be handled by 
the CloudFlare cache, it will be relayed to a single given subdomain. Be default, this is 
cloudflare-resolve-to.example.com (replacing example.com with each user's domain). 
If you wish to change the subdomain, edit the file /usr/local/cpanel/etc/cloudflare.json, 
changing the value of the host_prefix key to the desired subdomain. This subdomain will be 
automatically added to each user's zone file.

Uninstall: 

/usr/local/cpanel/bin/unregister_cpanelplugin <full path to install file cloudflare.cpanelplugin>

Customization:

To include customized text, edit the file /usr/local/cpanel/etc/cloudflare_local.tmpl. This file is included in CloudFlare's HTML template.

Command Line Tools:

List all zones currently active on CloudFlare:
# perl Cpanel/CloudFlare.pm list

Check to see if there is a new version of the CloudFlare plug-in available.
# perl Cpanel/CloudFlare.pm check


Copyright (c) 2011 by CloudFlare, Inc.
All Rights Reserved.

About

Provides a CPanel Plugin to allow one click CloudFlare setup.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 68.1%
  • Perl 28.8%
  • Shell 3.1%