3

I install apache, mysql, php and then phpmyadmin on ubuntu desktop 10.04 version I test apache: localhost with browser and its works. I test mysql with console and its works. I test phpmyadmin http://localhost/phpmyadmin/ and get error 404 not found I see that solution for that brobem, copy /phpmyadmin/ to /www/, but I dont want to put in /www/ to my websites files (maybe I wrong or miss something-please tell me in this case). How this problem can be solved in the best way? Thanks

Ben
  • 775
  • 4
  • 9
  • 19
  • I got a phpmyadmin 404 error aftern I upgraded to PHP 5.5, which automatically (I guess?) updated to Apache 2.4 also. Apache 2.4 changes its `conf.d` folder to `conf-enabled`. Full path: `/etc/apache2/conf-enabled/`. So you have to copy your phpmyadmin link over there. See this answer: http://stackoverflow.com/a/19176094/631764 – Buttle Butkus Mar 12 '14 at 04:03

2 Answers2

3

Did you use the package manager to install phpMyAdmin or did you install it from source? If you did install it using the package manager a configuration should already be in place but could be disabled. Take a look at https://help.ubuntu.com/community/phpMyAdmin for an Ubuntu specific explanation. This is how you can configure Apache to make phpMyAdmin available if you installed it from source:

Use the Alias directive in the Apache configuration to make phpMyAdmin available without placing it withing the DocumentRoot. This is how it should look like:

Alias /phpmyadmin /path/to/phpmyadmin

Please take a look at http://httpd.apache.org/docs/2.1/mod/mod_alias.html#alias. Also note the explanation about granting access using a <Directory> section when you get a "Forbidden" error and make sure the file system permissions are correct.

PowerSp00n
  • 1,506
  • 1
  • 8
  • 8
  • Another option is to create an Apache vhost for the mysql subdomain and set it's DocumentRoot to /usr/share/phpmyadmin. – WheresAlice May 18 '10 at 15:17
1

These may seem obvious but:

  • Try /phpmyadmin/ rather than /phpmyadmin
  • Make sure you have restarted apache after installing phpmyadmin

Good luck!

Kevin Sedgley
  • 394
  • 1
  • 2
  • 11