Pasta CentOS phpmyadmin proibida

Pasta CentOS phpmyadmin proibida

instalei php5, apache2, LAMP, PHPMyAdmin mas se eu digitar meu IP e PHPMyAdmin assimhttp://__meu_IP__/phpmyadminestá mostrando o erro

Proibido
Você não tem permissão para acessar /PHPMyAdmin/ neste servidor.

eu editei/etc/httpd/conf.d/phpmyadmin.confeste arquivo também adicionou meu endereço IP e permitiu meu endereço IP, ainda está mostrando o erro acima,

meu arquivo phpmyadmin.conf está assim agora

# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

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

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

como posso acessar a pasta PHPMyAdmin, para poder gerenciar o banco de dados facilmente, estou usando Redhat Linux 7.3, todos os pacotes estão atualizados!

por favor me ajude!

Responder1

Isso funciona. Centos 7.

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

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require all granted
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Allow from All
   </IfModule>
</Directory>

Responder2

Experimente esta configuração:

  <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
   Require ip 27.34.248.3
   </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
   Allow from 27.34.248.3
  </IfModule>
  </Directory>

Reinicie o serviço Apache:

systemctl restart httpd

Responder3

Você precisa alterar o arquivo de configuração do Apache do phpmyadmin

localização é /etc/httpd/conf.d/phpMyAdmin.conf

A configuração padrão é:

<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>

Altere para:

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

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require all granted
     </RequireAny>
   </IfModule>
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Allow from All
   </IfModule>
</Directory>

e reinicie o apache usando o comando

# service httpd restart

OU

# systemctl restart  httpd.service

informação relacionada