9

When I go to localhost/phpmyadmin I get the apache "Not Found" error (404). However, I can load html pages, and run php pages (such as <?php phpinfo(); ?>). And phpmyadmin is installed.

balter@homedevbox:~$ aptitude search phpmyadmin
i   phpmyadmin                                               - MySQL web administration tool

I also installed the standard ubuntu LAMP stack and set passwords for mysql and all that.

What could be the problem?

EDIT: Here is where my phpmyadmin files are.

balter@homedevbox:/var$ cd /
balter@homedevbox:/$ sudo find . -type d -name phpmyadmin
./var/lib/mysql/phpmyadmin
./var/lib/phpmyadmin
./etc/phpmyadmin
./usr/share/phpmyadmin
./usr/share/dbconfig-common/scripts/phpmyadmin
./usr/share/dbconfig-common/data/phpmyadmin
./usr/share/doc/phpmyadmin
abalter
  • 367

1 Answers1

12

Within the default Ubuntu's installation (apt install phpmyadmin) PhpMyAdmin is included (and enabled) into the Apache's configuration through this additional configuration file:

/etc/apache2/conf-enabled/phpmyadmin.conf

This file is a symbolic link to the file /etc/apache2/conf-available/phpmyadmin.conf and when we type a2enconf or a2disconf we 'enable' or 'disable' this symbolic link.

On its side, the file /etc/apache2/conf-enabled/phpmyadmin.conf is a symbolic link to the file /etc/phpmyadmin/apache.conf.

According to the discussion below the question, during the installation process something goes wrong and the last symbolic link isn't created.

The solution, that @abalter provided, is manual creation of this symbolic link:

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

Then enable this configuration file and restart Apache or just reload its configuration:

sudo a2enconf phpmyadmin.conf
sudo systemctl reload apache2.service    # within Ubuntu 16.04
sudo service apache2 reload              # within Ubuntu 14.04
pa4080
  • 29,831
  • Unfortunately this did not fix the issue for me. I have checked the symbolic links using "find . -type l -ls" and they appear active. Is there something else I can check? I did also verify that I have "Include /etc/phpmyadmin/apache.conf" included in my apache2.conf file. Before I post a new similar question, I figured I would double check for any additional insight. Thanks. – Bradford Benn Aug 30 '17 at 05:57
  • Hi, @BradfordBenn, in apache2.conf have a directive IncludeOptional conf-enabled/*.conf, which includes all configuration files into Apache's configuration. So we don't need do put Include /etc/phpmyadmin/apache.conf within apache2.conf if the above symlinks exists. Last week I sow a wrong configuration where the directive Include /etc/phpmyadmin/apache.conf was included into the same file /etc/phpmyadmin/apache.conf and this was the problem. – pa4080 Aug 30 '17 at 06:29
  • @BradfordBenn what is the error message when you try to browse localhost/phpmyadmin ? – pa4080 Aug 30 '17 at 06:42
  • it is the simple file 404 file not found. I just went into the apache2.conf and removed that line and rebooted. The exact error is: Not Found

    The requested URL /myphpadmin was not found on this server. Apache/2.4.18 (Ubuntu) Server at 172.22.106.247 Port 80 as it is truly a server install there is no local browser I am familiar with to use localhost

    – Bradford Benn Aug 30 '17 at 17:44