exp*_*per 5 php mysql apache phpmyadmin
我安装了 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>
Run Code Online (Sandbox Code Playgroud)
当我重新启动 apache 时,# service httpd restart,然后进入该网站,它仍然显示
禁止
您无权访问此服务器上的 /phpMyAdmin/。
Apache/2.2.15 (CentOS) 服务器位于 6gem.pw 端口 80
我找不到任何修复方法,请帮忙。
小智 1
编辑您的 phpMyAdmin 配置文件:
vim /etc/httpd/conf.d/phpMyAdmin.conf
Run Code Online (Sandbox Code Playgroud)
然后将所有“拒绝所有”更改为“拒绝所有”,将“不允许表单无”更改为“允许所有”。那应该有效:)
| 归档时间: |
|
| 查看次数: |
42090 次 |
| 最近记录: |