【发布时间】:2016-01-30 07:37:31
【问题描述】:
我刚刚在我的虚拟专用服务器上安装了 phpMyAdmin,但我无法从浏览器访问它来进行设置。 我验证了 /phpmyadmin 上的文件夹权限与我的 public_html 文件夹相同。
当我转到 url (http://www.testsite.com/phpmyadmin) 时,我收到 403 错误 "您无权访问此服务器上的 /phpmyadmin。Apache/2.2.15 (CentOS) 服务器位于 www.testsite.com 的 80 端口"
然后我转到我的 /var/log/httpd/error.log 并查看拒绝访问的条目(注意我用 x 部分替换了我的 IP 地址) [Thu Oct 29 19:12:46 2015] [error] [client xx.xxx.68.18] 客户端被服务器配置拒绝:/usr/share/phpMyAdmin
然后我编辑 /etc/httpd/conf.d/phpMyAdmin.conf 有以下几行
<Directory /usr/share/phpMyAdmin/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</Directory>
<Directory /usr/share/phpMyAdmin/setup/>
Order Deny,Allow
Deny from All
Allow from 127.0.0.1
Allow from ::1
</Directory>
在上面列出的每一段代码中,我在 Allow from ::1 下方添加
Allow from xx.xxx.68.18
我仍然收到相同的 403 错误。我将不胜感激一些见解和方向来解决这个问题。谢谢
【问题讨论】:
标签: apache phpmyadmin