I tried to install phpMyadmin in MacOs. But When I go to localhost/phpmyadmin
it says Forbidden You don't have permission to access this resource.
My phpMyAdmin folder is in
/usr/local folder in Finder. I configured the phpmyadmin.conf
file with sudo nano /etc/apache2/other/phpmyadmin.conf
with the following codes:
<Directory /usr/local/phpmyadmin>
Options Indexes
Order allow,deny
Allow from all
allow from 127.0.0.1
allow from 192.168.1.0/15
</Directory>
What should I do to get rid of this error?
2
Answers
Find file
httpd-xammp.conf
, change ‘Require local’ to ‘Require all granted’, save file and restart apacheYou need to check 2 things:
/usr/local/share/phpmyadmin
by default, but judging by your question I assume it’s/usr/local/phpmyadmin
; be sure to check on that too) is readable by your user and that directories that needs to be writeable by you are.I suggest changing the config file to look like this:
Make sure that the path in
<Directory /usr/local/phpMyAdmin/>
is pointing to your phpmyadmin location.Also I’m not sure there should be
Options Indexes
line in the config, try removing it temporarily.Upd: You need to restart apache after making changes to config files (usually it’s
sudo service apache2 restart
)