I have recently rebuilt one of my Linux boxes and reinstalled a LAMP stack on Ubuntu 12.04. I installed phpMyAdmin via apt-get in the normal manner but to my annoyance the virtual host was not set up during installation and this meant that http://localhost/phpmyadmin was throwing a 404 page not found error.
After going over my steps and checking the configuration files I noticed that apache2 had no knowledge of phpMyAdmins configurations. The fix was to symlink the phpMyAdmin conf file within the apache2/conf.d/ folder like so:
I don’t know why this config file wasn’t symlinked or copied during installation. I spent a good 30 minutes on this issue so I hope this helps someone facing the same problem.