Update 64 - CloudFlare + LVE Bad Gateway

Jamira40

Member
Dec 4, 2015
17
0
51
Slovakia
cPanel Access Level
Root Administrator
Hi,

Just in case somebody else has the same issue using CloudFlare + LVE and you can't see stats or any settings because CloudFlare returning 502 Bad Gateway.

The issue is in the way that cPanel changed the handling of Proxy Subdomains.

Open /usr/local/cpanel/whostmgr/docroot/cgi/CloudLinux.cgi and find this lines

  1. sub _checkReferer
  2. {
  3. my $protocol = (exists $ENV{ HTTPS } && $ENV { HTTPS } eq 'on')
  4. ? 'https' : 'http';
  5. my $ip = $ENV { HTTP_HOST };
  6. unless ($ENV{ HTTP_REFERER } =~ qr/^$protocol:\/\/$ip/) {
  7. sendError('BAD REFERER', 0, 1);
  8. }
  9. }
You have to comment out line 6 7 and 8.
There is something messed up with $protocol or REFERER I did not check them.

Of course, this will not last forever (maybe a minute) because it will check and modify that file again. But at least you know what is causing this issue and it's not CloudFlare issue.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,254
463
Hello @Jamira40,

It looks like CloudLinux has an internal case open (WEB-542) to investigate and determine if this is a bug in their LVE Manager plugin. We'll monitor the case and update this thread with more information once it's available.

Thank you.