Jump to content

[Answered] Request For Addition Of Mod_Cloudflare


craigis

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...