Jump to content

Recommended Posts

Posted

I was wondering if it would be possible to have the mod_cloudflare included sometime in one of the future server builds. (I'm on Stevie just for the record)

 

I use Cloudflare currently on all my sites so all the code that I use gets the real IP of the visitor when needed (though HTTP_CF_CONNECTING_IP var) however I tend to use .htaccess files during development that are filtered by IP's.

This of course doesn't work when Cloudflare is involved as it's always Cloudflares IP that's checked in the rules of the htaccess.

 

Another option however I haven't looked into it fully would be the Cpanel plugins for Cloudflare(This requires other work as it needs Cloudflare API keys and such) but allows people to signup and configure Cloudflare from Cpanel. This could be something worth looking at as the less requests that actually hit Heliohosts servers will reduce the load on them - it also protects from a lot of malicous attempts and spammers and such which is another plus.

 

Anyway it's just a suggestion due to the fact that if implemented would be a lot of work for someone to actually do :)

 

For reference mod_cloudflare can be found https://www.cloudflare.com/resources-downloads#mod_cloudflare

 

EDIT: Realized this probably should have gone into Customer Service

Posted

A few notes about cloudflare:

1) Cloudflare only caches images/css/js and certain documents like pdf. It does not cache html or dynamic content or anything that sends private headers.

 

2) By default, it changes the cache time value of any of those objects to 4 hours (regardless if it is 1 minute or 1 year on parent server).

 

3) It actually works. According to my account there,

2,349 requests saved by CloudFlare
4,572 total requests

 

4) The basic subscription is free.

 

5) It protects against DoS attacks.

 

6) You can add the following code to your script to see the real visitor's IP.

if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];

 

On wordpress, just add

add_action('init', 'cloudflare_ip',1);
function cloudflare_ip() {
if (isset($_SERVER["HTTP_CF_CONNECTING_IP"])) {
$_SERVER['REMOTE_ADDR'] = $_SERVER["HTTP_CF_CONNECTING_IP"];
}
} 

to your theme's functions.php file.

Posted
Another option however I haven't looked into it fully would be the Cpanel plugins for Cloudflare(This requires other work as it needs Cloudflare API keys and such) but allows people to signup and configure Cloudflare from Cpanel.

I actually brought this up to the admins a few weeks ago. It's being implemented. :)

 

I don't have any idea as to when we'll finally get it, but I do know we've been approved for the program you need to get the API key.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...