0

I used

apt-get install phpmyadmin

to install phpmyadmin after installing apache2 php5 and mysql the same way, Then when I went to http://[ip]/phpMyAdmin/ it gave me a 404 error. So i went and looked for the files and found them in /usr/share/phpMyAdmin so I made an alias by doing this

sudo ln -s /usr/share/phpMyAdmin /var/www

and now when I go back to phpmyadmin it gives me a 403 forbidden error. What should I do?

Thank You :)

Patrick Gates
  • 111
  • 1
  • 4

2 Answers2

1

This is most likely that the index.php (or whatever) inside /usr/share/phpMyAdmin isn't being opened by default. See what's inside that directory and then try specifying the file directly to see if that fixes it (we can fix the issue afterwards).

If not, it could be a permissions issue (it's unlikely): Find out which user is running apache:
sudo ps aux | grep "apache2" | cut -f1 -d" "
There will be a couple of roots in there, ignore those and pick the other username. Then try:
sudo -u whatever_user_that_was ls /usr/share/phpMyAdmin
If that gives permission denied, that's your problem.

James L
  • 6,025
  • 1
  • 22
  • 26
0

Check out the instructions from the Debian wiki to include phpadmin in your apache instance. Read the wiki first, then let me know if you're still having issues. Good luck!

EDIT:

More specifically, you just need to add the following line to /etc/apache2/apache2.conf:

Include /etc/phpmyadmin/apache.conf
Andrew M.
  • 11,182
  • 2
  • 35
  • 29