Reinis Rozitis r at
Mon Aug 9 20:17:22 MSD 2010

> The php script will in turn do the authentication against ldap and will 
> return either 201 (success!) or 401 (try again and auth will re-open).

If you are using just php you don't even need to change anything (at least 
it works with my generic setup) within nginx configuration (unless you want 
to protect static content which php has no control over).

The examples in work just 

>> I'll need this only to limit access to phpmyadmin and this will be 
>> accesses only few times a week apparently).

phpMyAdmin provides http authentification itself ( ):
$cfg['Servers'][$i]['auth_type'] = 'http';

(it is still good to at least restrict IP access to the path as http auth is 
plain text (especially if the DB server is accessible through public 
networks) and the phpma has experienced some nasty exploitable bugs in past)


More information about the nginx mailing list