I am wondering how to change the default URL for phpMyAdmin. I am using the latest version (4.0.4.1) on my CentOS 6 VPS. I am wanting to change it from /phpmyadmin to something more secure. I am unsure how to do this or where to even find my apache.conf file if there is one?
Thanks!
How to Change and Secure Default PhpMyAdmin Login URL. By default, the login page of phpmyadmin is located at http://<ip address>/phpmyadmin. The first thing that you will want to do is changing that URL. This will not necessarily stop attackers from targeting your server, but will lower the risks of a successful break-in.
# ln -s /usr/share/phpMyAdmin /usr/share/nginx/html OR # ln -s /usr/share/phpmyadmin /usr/share/nginx/html Now we need to change the URL of our phpMyAdmin page, we simply need to rename the symbolic link as shown: Finally, restart Nginx and PHP-FPM to apply changes and point your browser to http://<ip address>/my.
open /etc/httpd/conf.d/phpMyAdmin.conf if in CentOS or /etc/phpmyadmin/apache.conf in Debian and comment out the line (s) beginning with Alias. The above will allow us to access the phpmyadmin interface via http://<ip address>/my. Feel free to change the Alias above if you want to use another URL.
This change will not update the link in vestacp to the phpmyadmin link under websites, you will need to change the url destination in the theme also. We need to do this in two areas, admin and user folders.
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
phpMyAdmin default Apache configuration
Alias /phpmyadmin /usr/share/phpmyadmin
Change that to
phpMyAdmin default Apache configuration
Alias /anyname /usr/share/phpmyadmin
Then make sure to restart Apache
sudo /etc/init.d/apache2 restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With