The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to install mod_cloudflare

Discussion in 'General Discussion' started by hectorpn, Jun 20, 2011.

  1. hectorpn

    hectorpn Member

    Joined:
    Sep 23, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    Hi everyone.

    Sorry for the noob questions but can someone point me in the right direction to install mod_cloudflare?

    I am running WordPress and Magento on WHM 11.3 / CentOS 5.5 / Apache 2.2 / Nginx Admin 2.5

    First question: should I install at the Apache level (https://github.com/cloudflare/CloudFlare-Tools) or at Nginx level (HttpRealIpModule)... I am assuming Apache but please tell me if I am right?

    If as an Apache module, I would follow these steps: Performance, Security & Apps for Any Website | CloudFlare | Wiki ... should the LoadModule be in the PreMain include?

    Second question, if I follow the steps mentioned above, I assume it will survive cPanel updates, being done through the Include editor, correct?

    Thanks so very much!
     
  2. mambovince

    mambovince Well-Known Member

    Joined:
    Jan 15, 2005
    Messages:
    192
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    London, UK
    I'd also be interested if anyone has installed Cloudflare on their cPanel servers
    thanks
     
  3. nikc

    nikc Member

    Joined:
    Jun 30, 2011
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    I did this on my other server, but there were issues and cloudflare techs had to fix it for me (something odd with apxs).

    Nik
     
  4. hectorpn

    hectorpn Member

    Joined:
    Sep 23, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    0
    @mambovince I ended up following these instructions and it was super easy: Performance, Security & Apps for Any Website | CloudFlare | Wiki

    In my specific case I used the apxs (and not the aspxs2) command, but that may be OS-dependent. Then just added the line they say in my PRE-MAIN through WHM and restarted Apache. All worked well from there.
     
  5. tylerl

    tylerl Active Member

    Joined:
    Dec 11, 2009
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Bear in mind that unless you go through EasyApache to install an apache module, your module will get removed next time you do run easyapache. So, that's a bad idea.

    Instead, I've created a script that adds mod_cloudflare to your EasyApache build system. Here's the details: Installing mod_cloudflare on cpanel - TL Tech

    For the Impatient
    Code:
    sudo perl <(curl https://raw.github.com/tylerl/util/master/easyapache/cloudflare.pl) install
    sudo /scripts/easyapache
    
     
  6. dmacleo

    dmacleo Active Member

    Joined:
    Jan 28, 2012
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    sorry to bump older post but what is method to remove this?
    is it just deleting the mod_cloudflare.c file?
    thank you.
     
  7. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Do you mean to remove it from being called by Apache? It depends on how it was installed, but check for the include:

    Code:
    grep -Ri cloudflare /usr/local/apache/conf/*
    Additionally, move the module out of /usr/local/apache/modules location. There isn't any reason to entirely remove it from the system, since removing the module and removing the include for it with Apache would essentially remove it from being used.
     
  8. dmacleo

    dmacleo Active Member

    Joined:
    Jan 28, 2012
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    I recompiled EA w/o it so its not active, but is still an option for EA.

    but since I had issue with it last week (Support ID #3316071) I just want to delete it all for now.
    it was installed using the code above which made it option for EA.

    is there some sort of remove I could do like the install worked?

    - - - Updated - - -

    if I delete /var/cpanel/easy/apache/custom_opt_mods/Cpanel/Easy/ModCloudflare.pm will that make it NOT show as EA option?
    I am still learning how EA handles stuff like that so want to make sure,
    Thanks
     
  9. dmacleo

    dmacleo Active Member

    Joined:
    Jan 28, 2012
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    this seemed to work fine, thought I would post in case it came up again.
     
Loading...

Share This Page