Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

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.

SOLVED Inconsistent HTTP Headers

Discussion in 'EasyApache' started by martin MHC, Dec 8, 2016.

  1. martin MHC

    martin MHC Active Member

    Joined:
    Sep 14, 2016
    Messages:
    43
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Hello

    I have some inconsistent HTTP Headers on *some* sites on my server.

    I am running WHM 60.

    All server sites/accounts have the same settings. All have Easy Apache 4, with the mod_headers module. (I can list all modules loaded if you wish). All accounts use PHP5.6 through suPHP .

    Most sites load the HTTP headers correctly however one site, specifically, does not, returning:

    Content-Language: ·en

    Setting Header values in PHP at pageload time DOES NOT OVERWRITE THIS. Although header values do appended to the already set headers. I can also not remove headers from this site such as "Pragma:" headers.

    I also note that details such as PHP Session names, which are set in PHP.ini are not carried through to the HTTP Headers.

    I need to fix these inconsistency but having checked the account there are no httpd.conf includes I ca find and I can't find any way to edit settings on the mod_headers module.

    I have seached "tweak settings" as well as various apache editing settings on the WHM but found nothing that relates to either this account or this issue.

    How should I go about solving these issues?

    1) How can I fix this issue, which appears to be not server wide but account specific?

    2) How can I update the HTTP Headers sent out by Apache in general, for all accounts (specifically remove pragma)?

    Cheers
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    1. Could you configure a PHPINFO page for the affected domain name and verify if it's loading any custom PHP configuration values (E.g. from a custom php.ini file within the account)?

    2. You could add a custom entry to the /usr/local/apache/conf/includes/pre_virtualhost_global.conf file and then run the "/scripts/rebuildhttpdconf" command. For instance, if you wanted to set keep alive for all accounts:

    Code:
    <ifModule mod_headers.c>
    Header set Connection keep-alive
    </ifModule>
    Or, add the entry via "WHM >> Apache Configuration >> Include Editor":

    Advanced Apache Configuration - EasyApache 4 - cPanel Documentation

    Thank you.
     
  3. martin MHC

    martin MHC Active Member

    Joined:
    Sep 14, 2016
    Messages:
    43
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    I discovered the issue was with someone else had changed the DNS of the site in question and while browsers where loading the correct site, that HTTP header grabbing websites etc. where loading the placeholder default site (due to using the default AutoSSL domain).
     
    cPanelMichael likes this.
  4. martin MHC

    martin MHC Active Member

    Joined:
    Sep 14, 2016
    Messages:
    43
    Likes Received:
    6
    Trophy Points:
    8
    Location:
    UK
    cPanel Access Level:
    Root Administrator
    Thanks for your help, Michael, it's useful to know the steps for editing the default headers. Cheers
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
Loading...

Share This Page