I use Debian and Apache and say I have many virtual host files (above 20) and I want all of them to include this line in the end:

Alias /phpmyadmin /usr/share/phpmyadmin

The reason is to allow to navigate from the domain of each web app (per virtual host file) to PHPMyAdmin easy and fast, as in:


What is an efficient way to do so (that will also filter out virtual host files that might already include this line by manual addition)?


1 Answer 1


As I understand it, the package-provided configuration in phpmyadmin adds the alias in all virtual hosts: it adds a top-level

Alias /phpmyadmin /usr/share/phpmyadmin

entry in the Apache configuration.

When installing non-interactively, you need to ensure that the Apache 2 configuration is selected in phpmyadmin’s debconf, which might require pre-seeding.

  • It will be added even for virtual hosts created after PMA was installed as a Debian package, right?
    – user149572
    Dec 20, 2018 at 9:12
  • 1
    Yes, it’s a global configuration. Dec 20, 2018 at 9:13

You must log in to answer this question.