我无法在我的服务器中访问phpmyadmin。我被禁止了。
Os版:Red Hat Enterprise Linux Server 7.3版(Maipo)
我已经在stackoverflow中检查了答案但是,我无法解决我的问题。 我使用命令行安装了phpmyadmin。 运行phpmyadmin版本信息:4.5.4.1
我在/etc/httpd/conf.d/phpMyAdmin.conf中修改了值
我的服务器在Amazon Web Services免费套餐上运行。
这是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>
答案 0 :(得分:0)
你能告诉我你使用apache 2.4或apache 2.2的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)