I recently had a problem where I could not get any custom HTTP Headers passed to my PHP Script.
It seems that Apache 2 running PHP 7 with FCGID would not allowing and removing or tripping all custom HTTP Headers.
To fix it we need to use the FcgidPassHeader variable.
In my case I wanted the HTTP_SALESFORCEPROXY_ENDPOINT to be received by my PHP Script.
Here is how that gets added.
<IfModule mod_fcgid.c> FcgidPassHeader SALESFORCEPROXY_ENDPOINT </IfModule>
Remember to restart Apache after you added the code above.