I need to change alias name for phpmyadmin.
Presently, when I need access to phpmyadmin, I type mydomain/phpmyadmin. I need to change that. Please help to advise. How to change?
Presently, when I need access to phpmyadmin, I type mydomain/phpmyadmin. I need to change that. Please help to advise. How to change?
Changing the Application's Access Location
In order for our Apache web server to work with phpMyAdmin, our phpMyAdmin Apache configuration file uses an alias to point to the directory location of the files.
To change the URL where our phpMyAdmin interface can be accessed, we simply need to rename the alias. Open the phpMyAdmin Apache configuration file now:
sudo nano /etc/httpd/conf.d/phpMyAdmin.conf
Toward the top of the file, you will see two lines that look like this:
Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin
These two lines are our aliases, which means that if we access our site's domain name or IP address, followed by either /phpMyAdmin or /phpmyadmin, we will be served the content at/usr/share/phpMyAdmin.
We want to disable these specific aliases since they are heavily targeted by bots and malicious users. Instead, we should decide on our own alias. It should be easy to remember, but not easy to guess. It shouldn't indicate the purpose of the URL location. In our case, we'll go with /nothingtosee.
To apply our intended changes, we should remove or comment out the existing lines and add our own:
# Alias /phpMyAdmin /usr/share/phpMyAdmin
# Alias /phpmyadmin /usr/share/phpMyAdmin
Alias /nothingtosee /usr/share/phpMyAdmin
When you are finished, save and close the file.
To implement the changes, restart the web service: