Preciso de ajuda com o PhPMyAdmin

1. Preciso de ajuda com o PhPMyAdmin

Richardson Douglas
Richards0n

(usa CentOS)

Enviado em 22/06/2017 - 16:08h

Bem, eu recentemente instalei o PhPMyAdmin e tals...
Só que quando no site para acessar o painel apresenta o erro:
Forbidden
you don't have to permission

Foi procurando na net como resolver e tals... vi varios tópicos falando para alterar algo na /etc/httpd/conf.d/phpmyadmin.conf
Eu tentei de tudo e até agora nada...

Atualmente está assim:
# 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 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>

<Directory /usr/share/phpMyAdmin/setup/>
<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>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
Order Deny,Allow
Deny from All
Allow from None
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>


Espero que possam me ajudar =D


  


2. Re: Preciso de ajuda com o PhPMyAdmin

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/06/2017 - 16:18h

Provavelmente seja o SELinux. Teste em modo permissivo.


3. Re: Preciso de ajuda com o PhPMyAdmin

Richardson Douglas
Richards0n

(usa CentOS)

Enviado em 22/06/2017 - 16:22h

amarildosertorio escreveu:

Provavelmente seja o SELinux. Teste em modo permissivo.


Como posso fazer isso?




4. Re: Preciso de ajuda com o PhPMyAdmin

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/06/2017 - 16:32h

Em tempo de execução:

# setenforce 0

Para tornar permanente sem trabalhar os contextos você pode desabilitar ou tornar permissivo:

# vim /etc/selinux/config


5. Re: Preciso de ajuda com o PhPMyAdmin

Richardson Douglas
Richards0n

(usa CentOS)

Enviado em 22/06/2017 - 16:34h

amarildosertorio escreveu:

Em tempo de execução:

# setenforce 0

Para tornar permanente sem trabalhar os contextos você pode desabilitar o tornar permissivo:

# vim /etc/selinux/config


Ele já está desabilitado
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are pr$
# mls - Multi Level Security protection.
SELINUXTYPE=targeted




6. Re: Preciso de ajuda com o PhPMyAdmin

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/06/2017 - 16:38h

Posta o resultado do comando abaixo por gentileza:

# sestatus




7. Re: Preciso de ajuda com o PhPMyAdmin

Richardson Douglas
Richards0n

(usa CentOS)

Enviado em 22/06/2017 - 16:38h

amarildosertorio escreveu:

Posta o resultado do comando abaixo por gentileza:

# sestatus



SELinux status: disabled




8. Re: Preciso de ajuda com o PhPMyAdmin

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/06/2017 - 16:40h

Richards0n escreveu:

amarildosertorio escreveu:

Posta o resultado do comando abaixo por gentileza:

# sestatus



SELinux status: disabled



Analise os logs do apache.


9. Re: Preciso de ajuda com o PhPMyAdmin

Richardson Douglas
Richards0n

(usa CentOS)

Enviado em 22/06/2017 - 16:48h

amarildosertorio escreveu:

Richards0n escreveu:

amarildosertorio escreveu:

Posta o resultado do comando abaixo por gentileza:

# sestatus



SELinux status: disabled



Analise os logs do apache.


Aparece na maioria isso:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using vps135487.vps.ovh.ca. Set the 'ServerName' directive globally to suppress this message
[Thu Jun 22 15:18:42.537100 2017] [auth_digest:notice] [pid 3183] AH01757: generating secret for digest authentication ...
[Thu Jun 22 15:18:42.537867 2017] [lbmethod_heartbeat:notice] [pid 3183] AH02282: No slotmem from mod_heartmonitor
[Thu Jun 22 15:18:42.540690 2017] [mpm_prefork:notice] [pid 3183] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Thu Jun 22 15:18:42.540716 2017] [core:notice] [pid 3183] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Jun 22 15:18:47.291062 2017] [mpm_prefork:notice] [pid 3183] AH00170: caught SIGWINCH, shutting down gracefully
[Thu Jun 22 15:18:48.334921 2017] [suexec:notice] [pid 3211] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using vps135487.vps.ovh.ca. Set the 'ServerName' directive globally to suppress this message
[Thu Jun 22 15:18:48.347781 2017] [auth_digest:notice] [pid 3211] AH01757: generating secret for digest authentication ...
[Thu Jun 22 15:18:48.348432 2017] [lbmethod_heartbeat:notice] [pid 3211] AH02282: No slotmem from mod_heartmonitor
[Thu Jun 22 15:18:48.351116 2017] [mpm_prefork:notice] [pid 3211] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Thu Jun 22 15:18:48.351137 2017] [core:notice] [pid 3211] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Jun 22 15:18:50.361634 2017] [authz_core:error] [pid 3212] [client 181.213.50.92:50929] AH01630: client denied by server configuration: /usr/share/phpMyAdmin
[Thu Jun 22 15:25:37.941968 2017] [authz_core:error] [pid 3215] [client 181.213.50.92:51045] AH01630: client denied by server configuration: /usr/share/phpMyAdmin
[Thu Jun 22 15:36:00.735514 2017] [authz_core:error] [pid 3217] [client 181.213.50.92:51172] AH01630: client denied by server configuration: /usr/share/phpMyAdmin/
[Thu Jun 22 15:36:02.403363 2017] [authz_core:error] [pid 3217] [client 181.213.50.92:51172] AH01630: client denied by server configuration: /usr/share/phpMyAdmin/
[Thu Jun 22 15:36:11.842212 2017] [authz_core:error] [pid 3215] [client 181.213.50.92:51176] AH01630: client denied by server configuration: /usr/share/phpMyAdmin





10. Re: Preciso de ajuda com o PhPMyAdmin

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/06/2017 - 16:55h

Testei seu conf e reclamou algumas linhas.

# httpd -t

Testa ai:

# 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 127.0.0.1
#Require ip ::1
Require all granted
</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>

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</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>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
#Order Deny,Allow
#Deny from All
#Allow from None
Require all denied
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
#Order Deny,Allow
#Deny from All
#Allow from None
Require all denied
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
#Order Deny,Allow
#Deny from All
#Allow from None
Require all denied
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>



11. Re: Preciso de ajuda com o PhPMyAdmin

Richardson Douglas
Richards0n

(usa CentOS)

Enviado em 22/06/2017 - 17:01h

amarildosertorio escreveu:

Testei seu conf e reclamou algumas linhas.

# httpd -t

Testa ai:

# 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 127.0.0.1
#Require ip ::1
Require all granted
</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>

<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
#Require ip 127.0.0.1
#Require ip ::1
Require all granted
</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>

# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
<Directory /usr/share/phpMyAdmin/libraries/>
#Order Deny,Allow
#Deny from All
#Allow from None
Require all denied
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
#Order Deny,Allow
#Deny from All
#Allow from None
Require all denied
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
#Order Deny,Allow
#Deny from All
#Allow from None
Require all denied
</Directory>

# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#<IfModule mod_security.c>
# <Directory /usr/share/phpMyAdmin/>
# SecRuleInheritance Off
# </Directory>
#</IfModule>


Ainda não funcionou =/




12. Re: Preciso de ajuda com o PhPMyAdmin

Perfil removido
removido

(usa Nenhuma)

Enviado em 22/06/2017 - 17:01h

Você executou restart no apache?



  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts