问题描述
我是 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会出现此权限访问错误?
Why do I get this permission access error with phpMyAdmin?
我正在使用Windows 7.
I am using Windows 7.
推荐答案
将c:\wamp\alias\phpmyadmin.conf
的文件内容更改为以下内容.
Change the file content of c:\wamp\alias\phpmyadmin.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).
<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/的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!