Why are the Apache headers removed from my request when testing my web application?
This will occur when CGI and SuExec are in use and are the assigned PHP handlers. Removing SuExec and using RUID2 will allow the headers to be set. You can also use an alternative handler such as SuPHP, PHP-FPM, or LSAPI.
If you choose to remove SuExec and utilize RUID2, this will require the following changes:
RUID2 is also not compatible with LSAPI, SuPHP, or PHP-FPM, as indicated by these warnings in the EA4 interface:
The mod_fcgid Apache module is not compatible with the mod_ruid2 or mod_mpm_itk Apache modules.
The mod_lsapi Apache module is not compatible with the mod_ruid2 or mod_mpm_itk Apache modules.
suPHP is not compatible with the mpm_itk or the mod_ruid2 Apache module. You must uninstall suPHP if you want to use these modules.
If removing SuExec for RUID2 is not possible for your environment, and you cannot switch the PHP handler to LSAPI, SUPHP, or PHP-FPM, as an alternative, you can set the headers at the global level. Please review How to use Apache includes to add configuration directives to a specific domain's virtualhost
We encourage you to review the PHP Handlers documentation for further details.