Назад | Перейти на главную страницу

CentOS phpMyAdmin подключается с внешнего IP-адреса?

Я пытаюсь подключиться к phpMyAdmin, который работает на моем сервере CentOS, с моего компьютера со следующим файлом phpMyAdmin.conf:

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

   <IfModule mod_authz_core.c>
     # Apache 2.4
     <RequireAny>
       Require ip 127.0.0.1
       Require ip 192.168.5.100
       Require ip 192.168.5.120
       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 192.168.5.100
     Allow from 192.168.5.120
     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 192.168.5.100
       Require ip 192.168.5.120
       Require ip ::1


    Require ip 192.168.5.120
       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 192.168.5.100
     Allow from 192.168.5.120
     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.
#

У меня нет разрешения на доступ к нему с самого сервера или с моего ПК в той же сети и я получаю сообщение об ошибке:

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

Когда пытаюсь подключиться. Что мне делать, чтобы получить доступ к phpMyAdmin?

Изменить: мои журналы полны этого:

[Wed Jan 30 19:39:40.248831 2019] [authz_core:error] [pid 578] [client 192.168.5.100:51511] AH01630: client denied by server configuration: /usr/share/phpMyAdmin/