|OS type and version
Is there anyway to make phpmyadmin run on a custom port after installing the phpmyadmin script in Virtualmin? I would like to make it more secure by port forwarding only specific IP’s (source ips in the firewall) so not every tom dick and harry can have access to the login page.
I would fix it with a .htaccess file and allow/deny rules I guess, but it is possible what you ask.
If you are running Apache server, add a new directory block to the config with settings you need and the port you want and reboot apache.
#Setting IP restriction here is possible too, no need for change of port.
Deny from all
Allow from 188.8.131.52
Not tested, but should work.
phpMyAdmin is not a service to run it on a port. You can set up your webserver to listen on a port for phpMyadmin directory only.
If you seach on the Internet you will get a lot of solutions to protect the phpMyAdmin installation: change the directory name, protect with password, allow only some IP’s, …