PHP – NGINX: How to pass the PHP_AUTH_USER and PHP_AUTH_PW variables
In the Nginx configuration, just add the configuration
fastcgi_param $http-authorization if_not_empty HTTP_AUTHORIZATION;
Publicités
authentication variables to be filled out.
From the PHP rating, to recover them
$username - $_SERVER['PHP_AUTH_USER']; $password - $_SERVER['PHP_AUTH_PW'];
Publicités