Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

changing the phpmyadmin default url

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!

like image 586
user1922212 Avatar asked Jul 01 '13 11:07

user1922212


People also ask

How to change and secure default phpMyAdmin login URL?

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.

How to change the URL of my phpMyAdmin page using Nginx?

# 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.

How do I access phpMyAdmin interface via HTTP?

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.

Can I change the link in vestacp to phpMyAdmin?

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.


2 Answers

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
like image 174
Lafif Astahdziq Avatar answered Sep 19 '22 13:09

Lafif Astahdziq


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

like image 31
M_R_K Avatar answered Sep 20 '22 13:09

M_R_K