phpMyAdmin – How to Change phpMyAdmin Access URL

Apache2lampphpmyadmin

Could someone please tell me how to change phpMyAdmin's access URL, I would like it only to be accessible from a specific URL: database.example.com. example.com would be replaced to my actual domain.

I am running Ubuntu Server 14.04 LTS with LAMP and phpMyAdmin installed. I installed phpMyAdmin through command line using:

apt-get install phpmyadmin

Many Thanks,
Sam

Best Answer

For ubuntu (i used ubuntu 12.04), the default phpmyadmin apache configuration can be found at /etc/phpmyadmin/apache.conf

You can open it by type sudo nano /etc/phpmyadmin/apache.conf and change the third

Alias /yournewalias /usr/share/phpmyadmin

Do not forget to restart apache service,

sudo service apache2 restart
Related Question