phpmyadmin 禁止在运行在 Amazon Web Services EC2 上的 Red Hat Enterpr



我无法访问服务器中的phpmyadmin。我被禁止了。

操作系统版本:红帽企业Linux服务器7.3版(迈坡(

我已经在堆栈溢出中检查了答案,但是,我无法解决我的问题。我使用命令行安装了phpmyadmin。运行 phpmyadmin 版本信息:4.5.4.1

我已经修改了/etc/httpd/conf.d/phpMyAdmin.conf 中的值

我的服务器在亚马逊云科技免费套餐上运行。

这是phpMyAdmin.conf中的内容

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 all
# Allow from 127.0.0.1
# Allow from ::1
# AllowOverride all
# Require all granted
# </IfModule>
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
<IfModule mod_authz_core.c>
# Apache 2.4
<RequireAny>
Require ip ::1
</RequireAny>
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order Deny,Allow
Deny from All
Allow from ::1
</IfModule>
</Directory>
<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>

你能告诉我你使用的是哪个版本的Apache吗?假设 2.4添加到你 httpd.conf

<Directory /usr/share/phpmyadmin>
    Options FollowSymLinks
    DirectoryIndex index.php
    AllowOverride All
</Directory>

您的以下设置正在限制您从浏览器访问。

Order Deny,Allow
Deny from All
Allow from ::1

重新启动你的httpd(apache(

最新更新