Hi I have installed phpmyadmin on my centos machine and when I try to hit phpmyadmin
through my browser I get this error :
Forbidden
You don\'t
Find your IP address and replace where ever you see 127.0.0.1 with your workstation IP address you get from the link above.
. . .
Require ip your_workstation_IP_address
. . .
Allow from your_workstation_IP_address
. . .
Require ip your_workstation_IP_address
. . .
Allow from your_workstation_IP_address
. . .
and in the end don't forget to restart the server
sudo systemctl restart httpd.service
You need to follow the following steps:
Find line that read follows
Require ip 127.0.0.1
Replace with your workstation IP address:
Require ip 10.1.3.53
Again find the following line:
Allow from 127.0.0.1
Replace as follows:
Allow from 10.1.3.53
Also find deny from all
and comment it in the entire file.
Save and close the file.Restart Apache httpd server
:
# service httpd restart
Edit: Since this is the selected answer and gets best visibility ... please also make sure that PHP is installed, otherwise you get same Forbidden
error.
With the latest version of phpmyadmin 5.0.2+ at least
Check that the actual installation was completed correctly,
Mine had been copied over into a sub folder on a linux machine rather that being at the
/usr/share/phpmyadmin/
The problem with the answer with the most votes is it doesn't explain the reasoning for the solution.
For the lines Require ip 127.0.0.1
, you should instead add the ip address of the host that plans to access phpMyAdmin from a browser. For example Require ip 192.168.0.100
. The Require ip 127.0.0.1
allows localhost access to phpMyAdmin.
Restart apache (httpd) after making changes. I would suggest testing on localhost, or using command line tools like curl to very a http GET works, and there is no other configuration issue.
To allow from all:
#Require ip 127.0.0.1
#Require ip ::1
Require all granted