我正在尝试使用以下 phpMyAdmin.conf 从我的电脑连接到在我的 CentOS 服务器上运行的 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 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.
#
我没有权限从服务器本身或同一网络上的 PC 访问它,并收到错误消息:
> 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/