Carpeta CentOS phpmyadmin prohibida

Carpeta CentOS phpmyadmin prohibida

instalé php5, apache2, LAMP, PHPMyAdmin pero si escribo mi IP y PHPMyAdmin asíhttp://__mi_IP__/phpmyadminesta mostrando el error

Prohibido
No tienes permiso para acceder a /PHPMyAdmin/ en este servidor.

yo edité/etc/httpd/conf.d/phpmyadmin.confeste archivo también agregó mi dirección IP y permite mi dirección IP, aún se muestra el error anterior,

mi archivo phpmyadmin.conf es así ahora

# 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

¿Cómo puedo acceder a la carpeta PHPMyAdmin para poder administrar la base de datos fácilmente? Estoy usando Redhat Linux 7.3, ¡todos los paquetes están actualizados!

¡por favor, ayúdame!

Respuesta1

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

Respuesta2

Pruebe esta configuración:

  <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 el servicio Apache:

systemctl restart httpd

Respuesta3

Necesita cambiar el archivo de configuración de Apache de phpmyadmin

la ubicación es /etc/httpd/conf.d/phpMyAdmin.conf

La configuración predeterminada es:

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

Cámbielo a:

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

y reinicie Apache usando el comando

# service httpd restart

O

# systemctl restart  httpd.service

información relacionada