Allow IP to access PhpmyAdmin remote VPS

  1. For first you need MariaDB module installed… Go in software center and install it.
  2. Alter phpmyadmin installation

# yum -y install phpmyadmin
# service httpd restart

your phpmyadmin page is secured by ip so you cant reach it
You need to edit /etc/httpd/conf.d/phpMyAdmin.conf file, enter:

# vi /etc/httpd/conf.d/phpMyAdmin.conf

Where:

<Directory /usr/share/phpMyAdmin>

insert:

Require all granted

or your ip addr

using

Require ip

example:

<Directory /usr/share/phpMyAdmin> Require all granted </Directory>

after create an user and # service httpd restart you can access phpmyadmin

2 Likes

Ola

Some grains of sand

With apache24 you don’t need anymore ‘allow from all’ you use now ‘require all granted’

And also allow phpmyadmin to the www is not a good idea, maybe a ‘require local’ could do the trick and prevent brute force attack

Using a VPS needs remote access

the only solution for more safety is to use allow from ip !?

If you use a vps, indeed you need an access from a remote ip that it might change…Either because your are not at home/office or like me your ip can change. So the solution is to restrict the access to local and use a vpn to access to your webshare.

Edit: after thinking of it…you might also be protected if you install fail2ban and you create a jail against bad login in phpmyadmin

1 Like

i’ll check for it… I’ll update

Thanks for this, sounds interesting! :clap: