A
A
Arkadii0262018-10-10 11:04:48
PHP
Arkadii026, 2018-10-10 11:04:48

Why is access denied from this computer to phpmyadmin?

Please tell me, after installing phpmyadmin on centos, when I try to access it from another computer through a browser, I get a message.
Forbidden
You don't have permission to access /phpmyadmin/ on this server.
httpd
Server version: Apache/2.4.6 (CentOS)
Server built: Jun 27 2018 13:48:59
httpd error log
[Wed Oct 10 10:55:20.127987 2018] [mpm_prefork:notice] [pid 2419] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Oct 10 10:55:21.208769 2018] [suexec:notice] [pid 2451] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directive globally to suppress this message
[Wed Oct 10 10:55:21.230472 2018] [auth_digest:notice] [pid 2451] AH01757: generating secret for digest authentication ...
[Wed Oct 10 10:55:21.231036 2018] [lbmethod_heartbeat:notice] [pid 2451] AH02282: No slotmem from mod_heartmonitor
[Wed Oct 10 10:55:21.233679 2018] [mpm_prefork:notice] [pid 2451] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0 .2k-fips configured -- resuming normal operations
[Wed Oct 10 10:55:21.233726 2018] [core:notice] [pid 2451] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

phpmyadmin config in httpd

# 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


AddDefaultCharset UTF-8


# Apache 2.4

#Require ip 127.0.0.1
#Require ip ::1
Require all granted



# Apache 2.2
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1





# Apache 2.4

#Require ip 127.0.0.1
#Require ip ::1
Require all granted



# Apache 2.2
Order Deny,Allow
Deny from All
# Allow from All
# Allow from ::1
Require all granted



# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#

Order Deny,Allow
Deny from All
Allow from None



Order Deny,Allow
Deny from All
Allow from None



Order Deny,Allow
Deny from All
Allow from None


# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#
#
Please help, I just haven't tried it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladislav Lyskov, 2018-10-10
@Vlatqa

in mysql, access to the database by default is available only from the localhost,
you need to specify the Ip in the mysql config, from which the database will be accessed

F
Fedor, 2018-10-10
@keine-lust

In your apache config it says:

#Apache X.X

#Require ip 127.0.0.1
#Require ip ::1
Require all granted

# Apache 2.2
Order Deny,Allow
Deny from All                 # - запретить доступ со всех ip
Allow from 127.0.0.1      # - разрешить с 127.0.0.1 (это локалхост)
Allow from ::1                 # - разрешить с ::1 (это тоже локалхост)

You need to write:
Order Deny,Allow
Allow from All           # - доступ к phpmyadmin с любого ip

A
Arkadii026, 2018-10-10
@Arkadii026

I brought phpmyadmin.conf to this form, it seems that everything was resolved as much as possible, but the problem remained.
I no longer know where to dig ... some kind of nonsense.
# 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
AddDefaultCharset UTF-8
# Apache 2.4
Require all granted
Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from None
Allow from All
Allow from 192.168.0.82
Allow from ::1
# Apache 2.4
Require all granted
#Require ip ::1
# Apache 2.2
Order Deny,Allow
Deny from None
Allow from All
Allow from 192.168.0.82
Allow from ::1
# These directories do not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#
Order Deny,Allow
Allow from All
Deny from None
#Allow from None
Order Deny,Allow
Allow from All
Deny from None
#Allow from None
Order Deny,Allow
Allow from All
Deny from None
#Allow from None
# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRule Inheritance Off
#
#

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question