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

I have installed wordpress on a CentOS 6.6 server, everything works fine, WP, mysql etc but I cannot access the 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!

2

1 Answer

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!

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like