I need to make Apache's mod_auth_basic
opaque to PHP-FPM so that I can run scripts that get confused by Authorization headers. I've tried a variety of CGI and Header directives and so far am unable to hide the headers from PHP.
Specifically, with AuthType Basic
the PHP-FPM environment is always including these values:
$_SERVER['AUTH_TYPE']
$_SERVER['HTTP_AUTHORIZATION']
$_SERVER['PHP_AUTH_USER']
$_SERVER['PHP_AUTH_PW']
$_SERVER['REMOTE_USER']
I'm using Apache 2.4 and PHP8.3-FPM in Ubuntu 20.04.6.
The last resort would be adding a proxy server, but I'm hoping for a simpler solution.