我是WAMP的新手,今天才安装。

设置进行得很好,localhost似乎工作,但当我试图访问phpMyAdmin我得到这个错误:

被禁止的 您没有权限访问此服务器上的/phpmyadmin/。

为什么我得到这个权限访问错误与phpMyAdmin?

我用的是Windows 7。


当前回答

我发现使用localhost不能正确地允许从服务器进行本地访问。我必须使用127.0.0.1。

在phpmyadmin.conf中,这不起作用:

Deny from all
Allow from localhost

这招确实管用:

Deny from all
Allow from 127.0.0.1

我使用的是WampServer 2.2版

其他回答

我发现使用localhost不能正确地允许从服务器进行本地访问。我必须使用127.0.0.1。

在phpmyadmin.conf中,这不起作用:

Deny from all
Allow from localhost

这招确实管用:

Deny from all
Allow from 127.0.0.1

我使用的是WampServer 2.2版

对于Apache 2.4.2:

在httpd . conf中:

改变

Require local

to

Require all granted

我也遇到过类似的问题。我的Apache配置文件是这样的:

<VirtualHost *:80>
  ServerName  mywebsite.com
  ServerAlias www.mywebsite.com
  DocumentRoot "C:/wamp64/www/vtigercrm"
  <Directory "/"
    Options +Indexes +Includes +FollowSymLinks +MultiViews
      AllowOverride All
      Require all granted
  </Directory>
</VirtualHost>

以下是我的解决方法:

问题是我指定的目录为“/”(这是我的服务器上的根文件夹),而不是“C:/wamp64/www/vtigercrm/”,这是我有我的网站文件的地方。

我这样修改了我的配置:

<VirtualHost *:80>
  ServerName  mywebsite.com
  ServerAlias www.mywebsite.com
  DocumentRoot "C:/wamp64/www/vtigercrm"
  <Directory "C:/wamp64/www/myvtigercrm/"
    Options +Indexes +Includes +FollowSymLinks +MultiViews
      AllowOverride All
      Require all granted
  </Directory>
</VirtualHost>

一切都很顺利。

就连我也在域名问题上遇到了同样的问题。如果我给出一个IP地址,它就能工作。但有了域名就不是这样了。

然后我检查了我的DNS A记录。域有多个条目,分配了不同的IP地址。我删除了所有错误的值,它起作用了。如果有人遇到类似的问题,请再检查一下。

将localhost替换为127.0.0.1在您的URL,为我工作。