Setting up Railgun on cPanel

Using Railgun for faster load times and more efficient caching.

CP+RG

Nearly 70% of web content is cacheable (JS, CSS, & HTML). CloudFlare’s CDN leverages this by sync’ing to multiple datacenters worldwide.

They’ve taken it a step further with their RailGun Tech. RailGun maintains an active TLS/TCP link at which is able to cache up to 99.6% of the data from the origin server to CloudFlare.

Website structure changes are typically infrequent (body, tags, scripts, JSON API responses). When dynamic content changes, markup code is typically only slightly affected.

The “listener” module on the origin server detects these changes and syncs to the “sender” module on the CloudFlare network.

Installing RailGun on any RPM-based x64 server is simple.

Add the server’s IP(s) to your RailGuns in the CloudFlare Partner Panel

RailgunPartnerPortal

Prep the server by opening firewall TCP/2408 to CloudFlare’s Network IPs:

IPv4

103.21.244.0/22

103.22.200.0/22

103.31.4.0/22

104.16.0.0/12

108.162.192.0/18

131.0.72.0/22

141.101.64.0/18

162.158.0.0/15

172.64.0.0/13

173.245.48.0/20

188.114.96.0/20

190.93.240.0/20

197.234.240.0/22

198.41.128.0/17

199.27.128.0/21

IPv6

2400:cb00::/32

2405:8100::/32

2405:b500::/32

2606:4700::/32

2803:f800::/32

2c0f:f248::/32

2a06:98c0::/29

Add the following to httpd.conf

$ CloudFlareRemoteIPTrustedProxy 127.0.0.1

This adds your RailGun instance to the trusted proxy list.

Install RailGun with yum:

$ yum install railgun-stable

Activating RailGuns in cPanel:

Click the CloudFlare plugin in cPanel.cloudflare plugin

Select “Performance” from the top menu.

Performance

Scroll to the site you’d like to enable RailGun and click “Settings” to the left of the domain name you select.

Next to the RailGun option, press the “Off” button to toggle it to “On”

railgun

That’s it.

Any domain that is setup on CloudFlare’s DNS and has it’s IP listed in the partner panel can utilize Railgun via cPanel.

 

cPanel+CloudFlare cPanel Plugin

cPanel + CloudFlare cPanel Plugin

cP+CF

Maximizing security and efficiency.

Now that the CloudFlare cPanel plugin has been released, it’s easier than ever to setup your zones under CloudFlare’s protection from within cPanel.

cloudflare_plugin

Enabling the CloudFlare plugin is simple.

SSH to your server as root.

Download the plugin from GitHub and set it up with your Host API Key from CloudFlare and your company’s name.

bash <(curl -s https://raw.githubusercontent.com/Cloudflare/Cloudflare-CPanel/
master/Cloudflare.install.sh) -k HOST_API_KEY -n ‘YOUR_COMPANY_NAME’

Within a few minutes you’ll see: “Cloudflare module installed successfully”

**By default, the plugin can only handle CNAME records. To enable Full DNS setup edit:
/usr/local/cpanel/base/frontend/paper_lantern/Cloudflare/config.js

change the parameter:

“featureManagerIsFullZoneProvisioningEnabled”: false
to
“featureManagerIsFullZoneProvisioningEnabled”: true

Save and you’re done.

Now your end users can click on the CloudFlare icon in cPanel and login to their own individual CloudFlare accounts.

CF cPanel

cPanel & CloudLinux – Maximizing server density and stability

CloudLinux works by isolating each user into their own virtual environment and assigning resource blocks to each individual customer (CPU, IO, RAM, System processes).

This is accomplished by utilizing a transparent kernel-level technology called LVE (Lightweight Virtual Environment).

Segmenting control of resources gives the ability to further limit resource spikes by governing MySQL usage.

The built in MySQL Governor monitors usage, throttles abusers, and prevents MySQL overages before they can even happen.

Within WHM, CloudLinux gives you the visibility to see and control the exact resource usage of each website or end user.lvemgr

CloudLinux assigns each customer an LVE ID.

Limiting resources for each LVE is a snap using the LVE Manager via WHM.

LVEWHM

High-Performance Features:

Mod_LSAPi:

  • Is faster than any other way to serve PHP with Apache.
  • Doesn’t suffer from stability issues in process management like PHP FPM and mod_fcgid.
  • Includes the full benefits of opcode caching.
  • Is compatible with MPM Worker and Event.
  • Does not require tuning.
  • Includes support for PHP directives in .htaccess files.
  • Is a drop-in replacement for SuPHP, FCGID, RUID2, and ITK
  • Compatible with PHP Seclector.

PHP Selector:

Powerful tool that lets your end users select any PHP version that they need including 4.4, 5.1-5.6, and 7.0.

Ruby Selector and Python Selector available as well.

Convert your cPanel server to a CloudLinux + cPanel in a few simple steps:

The CloudLinux installer detects which version of cPanel you have, your specific hardware requirements, and any type of virtualization being used.

Start by obtaining a license: Log in or register @ https://cln.cloudlinux.com

Find your existing key or request a free 30 day trial activation key and take note as you’ll need it for server installation in just a moment.

Download & run the conversion script

Login to your server via SSH as root

# wget https://repo.cloudlinux.com/cloudlinux/sources/cln/cldeploy

# sh cldeploy -k # if you have activation key

or

 # sh cldeploy -i # if you have IP based license

reboot

Once the server has rebooted, run SSH and check the proper kernel is being used with :

# uname –a

“lve” Will be listed in the kernel name. When you see this, you’ll know you’re setup properly.

Login to WHM and search “LVE”.

You should now see the LVEManager plugin that installed during the conversion.

cPanel + CloudLinux is a great choice whether you’re new to hosting or a datacenter looking to maximize the density of your current environment.