Hello
I've installed phpmyadmin using the command apt-get install phpmyadmin, however am unable to open its login page in my web-browser when I type http://localhost/phpmyadmin
Installation was done properly and I can view the MySQL server from the webmin page.

Error is:

Not Found

The requested URL /phpmyadmin was not found on this server.
Apache/2.2.16 (Ubuntu) Server at localhost Port 80


Anyone knows how to make the phpmyadmin page load?

Dani AI

Generated

As ultimately showed, a 404 for the phpMyAdmin page after a package install almost always means Apache never got the phpMyAdmin Apache fragment (so the /phpmyadmin alias is not defined). 's DocumentRoot tip is useful — if no alias exists the browser will only find a phpmyadmin folder placed inside the site root. The practical fix is to make Apache load the package's phpMyAdmin config fragment and then reload the web server.

Quick checklist and troubleshooting steps:

  • Confirm the package actually installed the phpMyAdmin files (Debian/Ubuntu packages usually place them in the system web location, not necessarily inside the DocumentRoot).
  • Confirm Apache has an Alias /phpmyadmin entry in its enabled configs (the presence of that Alias is what makes /phpmyadmin resolve without a folder in the DocumentRoot).
  • On Debian/Ubuntu systems enable the phpMyAdmin config fragment (modern installs: sudo a2enconf phpmyadmin) and reload Apache (sudo systemctl reload apache2); older setups require placing or linking the fragment into Apache's include directory and then reloading the service.
  • Check that PHP is being handled (mod_php or php-fpm + proxy) so the phpMyAdmin PHP files can be interpreted.
  • Inspect Apache error logs (last several lines of the error log usually show why a request returned 404).

Windows 7 notes for :

  • When using XAMPP or WAMP ensure Apache and MySQL services are running and that the distribution's phpMyAdmin folder exists (XAMPP/WAMP ship a prepared alias). If Apache is running but the alias is missing, add the phpMyAdmin alias in Apache's config or put the phpMyAdmin folder into the server's www/htdocs root. Also watch for port 80 conflicts (IIS, Skype) and local firewall rules.

Security reminder: keep phpMyAdmin bound to localhost or protect it with additional access controls; avoid exposing it to the public internet.

Recommended Answers

All 3 Replies

It depends on your directory structure.

Issue this command to find your base directory:

~# cat /etc/apache2/sites-available/default | grep DocumentRoot

For example, if your document root is set as /var/www/htdocs

Then the URL localhost/phpmyadmin would mean that the phpmyadmin folder is located in /var/www/htdocs. If the phhpmyadmin folder isn't in there, then your path is wrong.

Hope that makes sense,
Regards,
ns

Finally figured out had to use this command instead to solve the problem, and needed to reload apache2 :

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

Anyone knows how to fix this problem on windows 7?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.