WAMP 错误:禁止您无权访问此服务器上的/phpmyadmin/ [英] WAMP error: Forbidden You don't have permission to access /phpmyadmin/ on this server

查看:22
本文介绍了WAMP 错误:禁止您无权访问此服务器上的/phpmyadmin/的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 WAMP 的新手,我今天刚刚安装了它.

I am new to WAMP and I have just installed it today.

设置进行得很顺利,本地主机似乎可以工作,但是当我尝试访问 phpMyAdmin 时,我得到这个错误:

The setup went well and localhost seems to work, but when I try to access phpMyAdmin I get this error:

禁止
您无权访问此服务器上的/phpmyadmin/.

Forbidden
You don't have permission to access /phpmyadmin/ on this server.

为什么我在使用 phpMyAdmin 时会收到此权限访问错误?

Why do I get this permission access error with phpMyAdmin?

我使用的是 Windows 7.

I am using Windows 7.

推荐答案

c:wampaliasphpmyadmin.conf的文件内容改为如下.

Change the file content of c:wampaliasphpmyadmin.conf to the following.

注意:出于安全目的,您应该将 Allow 指令设置为允许来自本地计算机.指令 Allow from all 是不安全的,应该仅限于您的本地机器.

Note: You should set the Allow Directive to allow from your local machine for security purposes. The directive Allow from all is insecure and should be limited to your local machine.

<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
        Allow from all
</Directory>

这里我的 WAMP 安装在 c:wamp 文件夹中.根据您的安装进行更改.

Here my WAMP installation is in the c:wamp folder. Change it according to your installation.

以前是这样的:

<Directory "c:/wamp/apps/phpmyadmin3.4.5/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1
</Directory>

Apache 2.2 及更高版本的现代版本将寻找 IPv6 环回而不是 IPv4 环回(您的本地主机).

Modern versions of Apache 2.2 and up will look for a IPv6 loopback instead of a IPv4 loopback (your localhost).

真正的问题是 wamp 绑定到 IPv6 地址.修复:只需添加 Allow from ::1 - Tiberiu-Ionuț Stan

The real problem is that wamp is binding to an IPv6 address. The fix: just add Allow from ::1 - Tiberiu-Ionuț Stan

<Directory "c:/wamp22/apps/phpmyadmin3.5.1/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
        Order Deny,Allow
    Deny from all
    Allow from localhost 127.0.0.1 ::1
</Directory>

这将只允许本地机器访问 Apache 的本地应用程序.

This will allow only the local machine to access local apps for Apache.

进行这些更改后重新启动您的 Apache 服务器.

Restart your Apache server after making these changes.

这篇关于WAMP 错误:禁止您无权访问此服务器上的/phpmyadmin/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆