When I was restarting the apche2, I was getting this message..

sudo service apache2 restart
 * Restarting web server apache2                                                                                                                AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message

and when I was typed the localhost/phpmyadmin, it showing the message

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

Please help me in this.

  • 2
    Hi There!! Can you try sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin & then sudo /etc/init.d/apache2 reload on a terminal and let me know. Sudo requires admin password, therefore; please provide accordingly. :) – AzkerM Sep 3 '15 at 7:52
  • I'm guessing you have phpmyadmin installed. If that's the case, you shouldn't have to symlink /usr/share/phpmyadmin like above mentioned, however you should check that you have /etc/apache2/conf-available/phpmyadmin.conf and that it has been enabled in /etc/apache2/conf-enabled/phpmyadmin.conf. If it is found in conf-available but not in conf-enabled then you will need to enable it using sudo a2enconf phpmyadmin.conf or sudo a2enconf /etc/apache2/conf-available/phpmyadmin.conf. – hazrpg Sep 3 '15 at 9:04
  • If that doesn't work, then try reinstalling phpmyadmin using sudo apt-get install --reinstall phpmyadmin - this will automatically setup phpmyadmin for you. – hazrpg Sep 3 '15 at 9:06

Have you tried to:

sudo -H gedit /etc/apache2/apache2.conf

Then add the following line to the end of the file:

Include /etc/phpmyadmin/apache.conf

Then restart apache:

/etc/init.d/apache2 restart
  • To improve answer quality, please explain what these instructions are actually doing and why this needs to be done. Thanks – Abraham Murciano Benzadon May 21 '18 at 17:09
  • This saved my life. I nearly shat myself. – Abdul Sadik Yalcin Jun 9 '18 at 1:33
  • beast!! thanks mate, 2019 PHP IS BACK – misterzik Feb 20 at 23:50

I believe this is because You haven't configure your phpmyadmin with the apache server well. If you installed the apache server and phpmyadmin using sudo apt-get install (Because you can install them using source code etc.) below procedure may works for you.

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

sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

sudo service apache2 restart

now type localhost/phpmyadmin in web browser address bar

if you did everything correctly now you can see the phpmyadmin on the browser.

(Due to your installation method of apache restarting the server or other thing may different. If it is, then you have to do manually what commands meant to do (this description is believing you are very new to apache in linux :) ))


On Ibrahim's answer, I used the nano in the terminal instead of gedit, cause I could not get gedit to work.

Root Terminal Steps

  1. Paste in terminal, this will open in the terminal Nano editor: nano /etc/apache2/apache2.conf

  2. Then add the following line to the end of the file: Include /etc/phpmyadmin/apache.conf

  3. ctrl-o and ctrl-x to save and exit.

  4. Then paste in terminal: restart apache: /etc/init.d/apache2 restart

protected by Community Sep 12 '16 at 16:16

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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