Apache restart not working properly?

11,306

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 :)

Share:
11,306

Related videos on Youtube

RGK
Author by

RGK

Updated on September 18, 2022

Comments

  • RGK
    RGK over 1 year

    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
    

    NOTE:

    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.

    • saiarcot895
      saiarcot895 almost 10 years
      Have you checked to see what the earlier alias was, as referenced by the warning message?
    • RGK
      RGK almost 10 years
      @saiarcot895, thanks for very first response, and I'm not checking earlier alias
    • Lety
      Lety almost 10 years
      could you post on pastebin the content of /etc/phpmyadmin/apache.conf, /etc/apache2/apache2.conf and /etc/apache2/sites-enabled/000-default.conf?
    • RGK
      RGK almost 10 years
      @saiarcot895, how can i check alias, like your comment? now if its possible or not?
    • Lety
      Lety almost 10 years
      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 :)