Running Debian Stretch 9.5 with apache2. After upgrading from Debian 8, I can no longer access phpmyadmin from http://localhost/phpmyadmin
. I get a page not found
error. Everything looks good on the apache config side:
- apache2.conf contains
IncludeOptional conf-enabled/*.conf
/etc/apache2/conf-enabled
containsphpmyadmin.conf
which symlinks to config in/etc/phpmyadmin/apache.conf
- I purposefully introduced syntax error into phpmyadmin config file and reloaded apache and it choked as expected. So apache is definitely loading the config file.
- Alias in config file is set to
Alias /phpmyadmin /usr/share/phpmyadmin
which is where the phpmyadmin files are installed.
I have uninstalled and reinstalled the phpmyadmin
package but that didn't help. I followed the instructions in /usr/share/doc/phpmyadmin/README.debian.gz
which said to run sudo dpkg-reconfigure -plow phpmyadmin
but that didn't help either.
I think I'm overlooking something basic in my apache config but I'm not sure what. Thanks.
My box was running with apache set to use Virtual hosts. I solved the problem by wrapping all the apache directives with a single directive in the
/etc/phpmyadmin/apache.conf
file like so:<VirtualHost *:80> <Directory /usr/share/phpmyadmin> ... </Directory> <Directory ...> ... </Directory> ... </VirtualHost>