I want to prevent phpmyadmin being accessible from the internet. I have two ethernet adapters on my CentOS 7 box, one 'internal' and one 'external'. I would like to restrict access so that users (any IP address) from the 'internal' network can access the phpmyadmin page and those connecting from the 'external' network (internet) cannot access the phpmyadmin page.
I have tried adding the below to my conf file and it did not make a difference.
Order Deny,Allow Deny from All Allow from 127.0.0.1
In /etc/httpd/conf/httpd.conf I have added the following at to the file:
Listen xxx.xxx.xxx.xxx:83 (xxx.xxx.xxx.xxx = the IP of the internal NIC)
ServerName phpmyadmin.server.local Alias /phpmyadmin /usr/share/phpMyAdmin/
And I've commented out the following in the /etc/httpd/conf.d/phpMyAdmin.conf file
Alias /phpMyAdmin /usr/share/phpMyAdmin
The only way I can get access to phpmyadmin is via http://xxx.xxx.xxx.xxx/phpmyadmin/index.php (port 80) and I have to have my IP address list as a '' address in phpMyAdmin.conf