phpmyadmin throws a 404 on opening

Use this command sudo nano /etc/apache2/apache2.conf to open the file using nano then add the following line:

Include /etc/phpmyadmin/apache.conf

Save and close. Then restart the server. This should work.