CodeCommitsIssuesPull requestsActionsInsightsSecurity
2d94a3e447917255d1b5f4790b30b16fc9ff308d

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

README

44lines · modecode

1CloudFlare plugin for CPanel.
2
3Requires:
4
5 * Net::SSLeay
6 * Simplezoneedit or Zoneedit features
7
8Provides access to the CloudFlare service. Learn more about CloudFlare at cloudflare.com.
9
10First, acquire a host api key from CloudFlare.
11
12Install (as root):
13
14./install_cf HOST_API_KEY [mod_cf]
15
16This works for the default theme and locale. Other themes or locales may require custom work.
17Replace HOST_API_KEY with your api key. Adding the string mod_cf will also install the Apache
18extension mod_cloudflare on the local server. More information is available here:
19https://github.com/cloudflare/CloudFlare-Tools.
20
21Edit API key:
22
23If you need to, update your API key by editing the file /usr/local/cpanel/etc/cloudflare.json, updating
24the value host_key.
25
26Edit CloudFlare prefix:
27
28After having been routed through the CloudFlare network, if the traffic is clean and cannot be handled by
29the CloudFlare cache, it will be relayed to a single given subdomain. Be default, this is
30cloudflare-resolve-to.example.com (replacing example.com with each user's domain).
31If you wish to change the subdomain, edit the file /usr/local/cpanel/etc/cloudflare.json,
32changing the value of the host_prefix key to the desired subdomain. This subdomain will be
33automatically added to each user's zone file.
34
35Uninstall:
36
37/usr/local/cpanel/bin/unregister_cpanelplugin <full path to install file cloudflare.cpanelplugin>
38
39Copyright (c) 2011 by CloudFlare, Inc.
40All Rights Reserved.
41
42Customize:
43
44Edit the file /usr/local/cpanel/etc/cloudflare_local.tmpl. This file is included in CloudFlare's HTML template.