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.

Update 64 - CloudFlare + LVE Bad Gateway

Discussion in 'CloudLinux' started by Jamira40, Apr 20, 2017.

  1. Jamira40

    Jamira40 Member

    Joined:
    Dec 4, 2015
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    34,345
    Likes Received:
    1,003
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page