I checked few tutorials on how to run phpMyAdmin on different port but they were a bit confusing for me since I do not work with apache that much. So I decided to write a newbie one.
Why do I want to do this? Well it's in my humble opinion more secure then allowing anyone to access your phpMyAdmin from well know path and public port.
First you need to remove phpMyAdmin config file /etc/apache2/conf-available/phpmyadmin.conf
or Include directive in apache config file /etc/apache2/apache2.conf
Then You need to add new listening port to Your ports.conf file located in /etc/apache2/ports.conf
and new vhost with phpMyAdmin secret path to Your ports.conf file as well
Alias /SecretPathTophpMyAdmin /usr/share/phpmyadmin
After You need to reload apache configuration by issuing following command
service apache2 reload
Now You can access your phpMyAdmin only on port 8030 with custom path
As You can see its not ppssible to access phpMyAdmin on port 80 with custom and default path nor on port 666 with default path (I used port 666 instead of port 8030 in my configuration)
But it is possible to access it on port 666 with custom path
Other articles that may be useful
- 07/29/2014 - First published.