I'm newbie to ubuntu. And I'll install the lamp and phpmyadmin its also working fine, but my problem is when I trying to restart the service of apache2 is not restarting good, its says looks like,

   ubuntu@P3-SD1:~$ sudo service apache2 restart

   * Restarting web server apache2                                                    [Tue Jul 01 18:59:36.992771 2014] [alias:warn] 
    [pid 23365] AH00671: The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.   
                                                                           [ OK ]

Then I try check the http://localhost and http://localhost/phpmyadmin and phpinfo() all of them working fine...

I'm trying to fix, And remove the line 3 of following directory /etc/phpmyadmin/apache.conf at line 3

Alias /phpmyadmin "/usr/share/phpmyadmin/"

then apache2 restart is looking good, looks like

ubuntu@P3-SD1:~$ sudo service apache2 restart

  • Restarting web server apache2 [ OK ]

But, http://localhost/phpmyadmin/ not working its says

Not Found

The requested URL /phpmyadmin/ was not found on this server.

Apache/2.4.7 (Ubuntu) Server at localhost Port 80


  1. If I add the Alias (Alias /phpmyadmin "/usr/share/phpmyadmin/") means phpmyadmin working fine.

  2. Next,

gksu gedit /etc/apache2/apache2.conf

following line add end of the file.

Include /etc/phpmyadmin/apache.conf

  1. Add, this one also but not working

Include /etc/phpmyadmin/apache.conf

Thanks in advance.

  • 3
    Have you checked to see what the earlier alias was, as referenced by the warning message? Commented Jul 1, 2014 at 14:25
  • @saiarcot895, thanks for very first response, and I'm not checking earlier alias
    – RGK
    Commented Jul 1, 2014 at 14:28
  • could you post on pastebin the content of /etc/phpmyadmin/apache.conf, /etc/apache2/apache2.conf and /etc/apache2/sites-enabled/000-default.conf?
    – Lety
    Commented Jul 1, 2014 at 21:27
  • @saiarcot895, how can i check alias, like your comment? now if its possible or not?
    – RGK
    Commented Jul 3, 2014 at 4:44
  • 1
    Alias directive in the same context are executed in a specific order. For examples if you define Alias /a /mydir/subdir and then later in the same context Alias /a/b /myseconddir/subdir apache print the warning message because the second Alias will never match. If you don't post your file, is difficult give you help :)
    – Lety
    Commented Jul 3, 2014 at 20:12

2 Answers 2


In the file /etc/apache2/apache.conf comment the below line:

# Include /etc/phpmyadmin/apache.conf

Then, on /etc/phpmyadmin/apache.conf make sure the following alias is there:

Alias /phpmyadmin "/usr/share/phpmyadmin/"

Restart the apache:

sudo /etc/init.d/apache2 restart

Now you should be able to use phpmyadmin and the error message should be displayed.

Hope it helps :)


I've been having the same issue, but the Include line was nowhere to be found in my .conf file. I've been searching for solutions, but they all say to comment out that same line.

So, I started looking around within the files and trying different things. What I finally came up with, that actually worked, was switching the aliases around. So the lines looked like the following:

#Alias /phpmyadmin /usr/share/phpmyadmin
Alias /usr/share/phpmyadmin /phpmyadmin

I restarted apache2, and the error was gone.

Whether or not the problem has been resolved has yet to be seen, but checking the journalctl -xe and systemctl status apache2 are showing as running normal, and without error.

Just something to try if the above answer doesn't work. ;)

  • 1
    Welcome to Ask Ubuntu. You are answering a 10 year old question with an 8 year old answer. In the 8 years since the other answer was written, file locations and names in both Ubuntu and apache may have changed. Please edit your question and add which version of Ubuntu and apache2 you are using.in this question answer site we try to make the answers self standing without any detailed reference to previous answers, other than "it didn't work for me".
    – user68186
    Commented Jun 6 at 22:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .