First, check the Apache version with:
rpm -q httpd
or
yum list installed httpd
Then, modify the appropriate sections of the config file
/etc/httpd/conf.d/phpMyAdmin.conf::
<Directory /usr/share/phpMyAdmin/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require all granted <-- add this line for Apache 2.4 Require ip 127.0.0.1 Require ip ::1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow # Deny from All <-- or comment out this line for Apache 2.2 Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory> <Directory /usr/share/phpMyAdmin/setup/> <IfModule mod_authz_core.c> # Apache 2.4 <RequireAny> Require all granted <-- add this line for Apache 2.4 Require ip 127.0.0.1 Require ip ::1 </RequireAny> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 Order Deny,Allow # Deny from All <-- or comment out this line for Apache 2.2 Allow from 127.0.0.1 Allow from ::1 </IfModule> </Directory>