2

I have installed wordpress on a CentOS 6.6 server, everything works fine, WP, mysql etc but I cannot access the http://MY_IP/phpmyadmin page to import DB as I get:

You don't have permission to access /phpmyadmin on this server.

I checked the log in :

/var/log/httpd/error_log

And found :

[error] [client 192.168.2.12] client denied by server configuration: /usr/share/phpMyAdmin

The server IP is 192.168.2.101 and I tried to access from another machine with 192.168.2.12 IP. Tried to access from the server itself but doesnt work either.

Any idea how can I fix this ? Thanks!

CharlieRB
  • 23,021
  • 6
  • 60
  • 107
rf2632
  • 139

1 Answers1

1

I have found the solution:

I edited the file /etc/httpd/conf.d/phpMyAdmin.conf like the following :

<Directory /usr/share/phpMyAdmin/>
 AddDefaultCharset UTF-8

 <IfModule mod_authz_core.c>
 # Apache 2.4
 <RequireAny>
   Require ip 127.0.0.1
   Require ip ::1
 </RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
#   Apache 2.2
    Order Deny,Allow
#     Deny from All
    Allow from 127.0.0.1
    Allow from ::1
</IfModule>
</Directory>

Basically I commented out : "Deny from All", httpd restarted and it works!

rf2632
  • 139