0

When accessing the phpMyAdmin link (mydomain.com/phpMyAdmin/), I am being prompted with a BasicAuth pop-up.

The phpMyAdmin/config.inc.php does not overwrite any defaults, therefore the config.default.php is used, which has auth_type set as cookie.

$cfg['Servers'][$i]['auth_type'] = 'cookie';

There's no .htaccess file in my phpMyAdmin, nor an entry in httpd.conf pointing to the phpMyAdmin folder.

The overall Directory entry in httpd.conf looks like this:

<Directory "/var/www/home">
  Options Indexes FollowSymLinks
  AllowOverride All
</Directory>

If I add a .htpasswd inside the phpMyAdmin folder, entering the there stored user and password lets me get to the phpMyAdmin page.

The thing is that I would like to have a single .htpasswd outside the www folder, however even if I add a .htaccess file pointing to the outside .htpasswd file, it's still asking me for the user/pass from the inside-phpMyAdmin .htpasswd file.

AuthType Basic
AuthName "Authentication Required"
AuthUserFile "/etc/htpasswd/.htpasswd"
Require valid-user

Creating a new empty folder, say phpMyAdmin2, .htaccess works as expected for that folder. Thus I suppose it has something to do with phpMyAdmin?!

Why when accessing the phpMyAdmin link I am prompted for a BasicAuth? How can I find where is that configured?

Chris Dev
  • 117
  • 6
  • AFAIK the "AuthName" has to be identical to get it working. – Silent-Bob Jun 09 '16 at 12:32
  • With what should it be identical? The `AuthName` only appears in `/var/www/home/phpMyAdmin/.htaccess`, or is there another place where I should set that? – Chris Dev Jun 09 '16 at 12:44
  • If you have two .htaccess files at different parts of the tree, they need to have the same AuthName to be treated as same. – Silent-Bob Jun 10 '16 at 05:45
  • Aha, I understand. From the official docs: `The AuthName directive sets the Realm to be used in the authentication. The realm serves two major functions. First, the client often presents this information to the user as part of the password dialog box. Second, it is used by the client to determine what password to send for a given authenticated area.` However that's not the cause of the problem above. – Chris Dev Jun 10 '16 at 07:29

0 Answers0