If you want to change the default path of phpMyAdmin to another and then protect the directory for user access via “.htaccess” File.

Edit: “/etc/phpmyadmin/apache.conf”:

Alias /db /usr/share/phpmyadmin

if you take a look into your logwatch and you see something like this :

…. then someone tried to run your phpMyAdmin-Setup.

Edit: “/usr/share/phpmyadmin/.htaccess”:

AuthType Basic
AuthName “Passwortschutz”
require valid-user
AuthUserFile /usr/share/phpmyadmin/.htpasswd

Edit: “/usr/share/phpmyadmin/.htpasswd”:

(you can use a generator like this link.)


this example is for user “test” with the password “1234”.


if you phpmyadmin page is not visible try this:

or in our case:

but if you have a html folder in www use “/var/www/html”.


Leave a Reply

Your email address will not be published.

thirteen + 16 =