How to disable phpmyadmin access with domain.com/phpmyadmin
But you want to disable access to phpmyadmin completely or you want to access to phpmyadmin with another alias like example.net/whatever ?
If it is the first and you are using Nginx+Apache2:
mv /etc/apache2/conf.d/phpmyadmin.inc /etc/apache2/conf.d/phpmyadmin.disabled
systemctl restart apache2
If you are using Nginx standalone:
mv /etc/nginx/conf.d/phpmyadmin.inc /etc/nginx/conf.d/phpmyadmin.disabled
systemctl restart nginx
If you want to change the alias to access phpmyadmin with another name; Server -settings -> Configure -> Databases -> phpMyAdmin Alias -> Save

You could also edit the templates your sites are using to remove the include/IncludeOptional directives that load phpmyadmin.inc file.
You could also edit the templates your sites are using to remove the
include/IncludeOptionaldirectives that loadphpmyadmin.incfile.
When we update we might revert the templates so make sure to create new templates…
A post was split to a new topic: phpMyAdmin Alias Not Working