martin MHC

Well-Known Member
Sep 14, 2016
345
75
78
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
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.
 

martin MHC

Well-Known Member
Sep 14, 2016
345
75
78
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).
 
  • Like
Reactions: cPanelMichael

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,270
463
Hello,

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