You may want to contact Cloudflare directly for additional support.
Mod_Cloudflare is not developed or supported by cPanel, so the assistance and experience I can offer is limited.
I did the same steps as before to put Apache back online.
It mentions a Cloudflare cPanel plugin that includes mod_Cloudflare. May I ask what hosting provider you are going through? I think you will need SSH access to your server.
Perform the process Option 2: Installation on cPanel Servers
cPanel uses a system known as EasyApache to rebuild Apache httpd during updates or certain configuration changes. The below instructions will integrate mod_Cloudflare support into EasyApache so that it can be easily included from the cPanel web interface and remain activated in Apache httpd after rebuilds.
Note: credit for this perl script goes to Tyler Larson at tltech.com.
Next, you can use EasyApache, choose to customize your profile, then, on the āShort Options Listā screen, checkbox the āMod Cloudflareā feature, and click āSave and Buildā.
But when compiling with easyapache, it gives me error and does not finish compiling. My pages are left offline and I have to revert changes.
Apache was down and failing to start due to a syntax error in the configuration.
====================
[14:59:11 server root @ 8600163 ~] cPs # / scripts / restartsrv_httpd --status
(XID hetjhh) The āhttpdā service is down.
====================
[15:00:02 server root @ 8600163 ~] cPs # / scripts / restartsrv_httpd
Waiting for āhttpdā to start ā¦ info [restartsrv_httpd] The service āhttpdā failed to restart at least three times. The system will now rebuild the httpd.conf file.
ā¦ failed.
Cpanel :: Exception :: Services :: StartError
Service Error
(XID uykndd) The āhttpdā service failed to start.
Startup Log
Httpd: Syntax error on line 225 of /etc/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/conf.d/Cloudflare.conf: Can not load / usr / lib64 / apache2 / modules / mod_Cloudflare .so into server: /usr/lib64/apache2/modules/mod_Cloudflare.so: undefined symbol: ap_log_rerror
To solve the issue, I moved the problematic Cloudflare.conf file aside:
Thank you for the detailed reply! I unfortunately havenāt used Apache in quite some time, and donāt have any experience with EasyApache or installing things into cPanel - so I have a few more questions for you so that others with more experience in those realms may have additional information in order to assist you. Donāt worry though, Iām not giving up!
Who is your hosting provider? (possibly not relevant but who knows)
What distribution are you running? (Ubuntu, CentOS, etc.)
Iāve googled some of those error messages and there seem to be solutions out there. Knowing the answers to the above will help further troubleshoot this issue. Thanks!
Ok cool, so it sounds like you have total control of your VM - some folks use shared hosting so their options are limited.
Are you running CentOS 7?
I found this which may be helpful, however you would need to switch to the option 3 I think and try manual installation instead of through cPanel, which Iām not sure if youāre willing to try.
Iām a bit out of my depth here at this point so Iām hoping someone else will chime in, as Iām sure thereās something obvious that Iām missingā¦
While intended for both CentOS6 and CentOS7, this script works correctly for me on 7, but not on 6:
Starting httpd: httpd: Syntax error on line 230 of /etc/apache2/conf/httpd.conf: Syntax error on line 1 of /etc/apache2/conf.d/Cloudflare.conf: Cannot load /usr/lib64/apache2/modules/mod_Cloudflare.so into server: /usr/lib64/apache2/modules/mod_Cloudflare.so: undefined symbol: ap_log_rerror
Subsequently I tried downloading and compiling (after installing the apache devel package for the OS, and that worked on CentOS6 (and one RHEL6 I tried, although that required subscribing to the āoptionalā channel for the development packages):