PhpMyAdmin configuration

PhpMyAdmin configuration

Posted By: pmietlicki

Published to Dev on Jul 22, 2017

The easiest thing is to modify auth_type to http :

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

Inside the configuration file, you can change this setting :

$cfg['Servers'][$i]['AllowDeny']['rules']

Some examples :

'all' -> 0.0.0.0/0
'localhost' -> 127.0.0.1/8
'localnetA' -> SERVER_ADDRESS/8
'localnetB' -> SERVER_ADDRESS/16
'localnetC' -> SERVER_ADDRESS/24

//block root from logging in except from the private networks
$cfg['Servers'][$i]['AllowDeny']['order'] = 'deny,allow';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array(
 'deny root from all',
 'allow root from localhost',
 'allow root from 10.0.0.0/8',
 'allow root from 192.168.0.0/16',
 'allow root from 172.16.0.0/12',
);

Tags: php

Archive