【发布时间】:2017-01-26 05:20:30
【问题描述】:
我安装了 phpmyadmin,但是当我在网站上时:ip/phpmyadmin 我尝试登录,但我无法登录,它不会重定向我,所以我将其删除并重新安装。
从那时起,我什至无法连接到该站点。在 /etc/httpd/phpMyAdmin.conf 文件中,我已经添加了四次 ips,就像这样......
# 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>
当我重新启动 apache 时,# service httpd restart,然后进入网站仍然显示
禁止
您无权访问此服务器上的 /phpMyAdmin/。
Apache/2.2.15 (CentOS) 服务器位于 6gem.pw 端口 80
我找不到任何修复方法,请帮忙。
【问题讨论】:
-
出于目的,到目前为止,我还没有在网站上包含我的 IP。但在实际文件中,我添加了我的 IP。我运行它所有的 vps,所以我添加了我的计算机 IP
-
首先我会检查'/usr/share/phpMyAdmin'文件夹的权限。
-
网络服务器错误日志说明您拒绝的连接尝试是什么?
-
堆栈上有大量的解决方案,例如:stackoverflow.com/questions/23235363/…
标签: php mysql apache phpmyadmin