![Virtualmin 和 phpmyadmin - 您无权访问此服务器上的 /phpmyadmin/](https://linux22.com/image/519650/Virtualmin%20%E5%92%8C%20phpmyadmin%20-%20%E6%82%A8%E6%97%A0%E6%9D%83%E8%AE%BF%E9%97%AE%E6%AD%A4%E6%9C%8D%E5%8A%A1%E5%99%A8%E4%B8%8A%E7%9A%84%20%2Fphpmyadmin%2F.png)
我无法访问 phpmyadmin。我尝试了在 Google 上找到的所有方法。也许有人可以帮助我?谢谢您的回答。
Forbidden
You don't have permission to access /phpmyadmin on this server.
我使用带有 virtualmin 的 CentOS 5。
phpMyAdmin.conf
# 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/>
#order deny,allow
#deny from all
allow from 127.0.0.1
allow from ::1
</Directory>
# This directory does 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>
# 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>
配置.inc.php
...
$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)
...
答案1
您没有从 127.0.0.1 或 ::1 地址访问 phpmyadmin。
您需要找出您从哪个地址访问 phpmyadmin,并将其添加到允许地址列表中。这很可能是您的服务器的公共 IP 地址。
例如,如果你的公共 IP 地址是 192.168.1.54,那么你可以将其添加到你的配置中
<Directory /usr/share/phpMyAdmin/>
#order deny,allow
#deny from all
allow from 192.168.1.54
allow from 127.0.0.1
allow from ::1
</Directory>