1

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 contains phpmyadmin.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.

  • What error message do you get from Apache when you try to access http://localhost/phpmyadmin/? – Tommiie Oct 22 '18 at 13:07
  • Just a blank page with "Page Not Found" at the top. There's no HTML in the source code. Just those words. – StevieD Oct 22 '18 at 13:10
  • I should add that I followed the instructions in the /usr/share/doc/phpmyadmin/README.debian.gz which said to run sudo dpkg-reconfigure -plow phpmyadmin. Didn't help. – StevieD Oct 22 '18 at 13:11
  • OK, I think I got it. This server is set up for virtualhosts so I had to wrap the <Directory> directive in the phpmyadmin config with <VirtualHosts :80>. I'm now getting a proper html document returned (though it has a phpmyadmin error in it). – StevieD Oct 22 '18 at 13:25
  • Can you write that up in an answer and mark it as such? – Tommiie Oct 22 '18 at 13:26
0

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>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.