wampserver出现You don’t have permission to access/on this server

来源:互联网 发布:c语言中mod函数 编辑:程序博客网 时间:2024/06/05 19:48

这些天都在都遇到wampserver提示出现:You don't have permission to access/on this server.的提示,一直没去解决。今天由于网站开始改版得用到wamp,所以就得搞定这个问题了。

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

本地搭建wamp,输入http://127.0.0.1访问正常,当输入http://localhost/,apache出现You don't have permission to access/on this server.的提示,如何解决?

  • 找到httpd.conf,用记事本打开httpd.conf,然后将
  1. <Directory />
  2.     Options FollowSymLinks
  3.     AllowOverride None
  4.     Order deny,allow
  5.     Deny from all
  6. </Directory>

这里改成:

  1. <Directory />
  2.     Options FollowSymLinks
  3.     AllowOverride None
  4.     Order deny,allow
  5.     Allow from all
  6. </Directory>

 还有一处将下面

  1. # onlineoffline tag - don't remove
  2. Order Deny,Allow
  3. Deny from all  
  4. Allow from 127.0.0.1
  5. </Directory>

Deny from all  改为:Allow from all  ,然后重新启动所有服务。

现在打开localhost或127.0.0.1时发现可以访问了,但访问phpmyadmin时候,出现“You don't have permission to access /phpmyadmin/ on this server.”的提示。

  • 解决方法,打开如下文件:

C:/wamp/alias/phpmyadmin.conf    //这个就是你的wamp的安装目录下的内容,用编辑器打开

修改成这样:

  1. <Directory "c:/wamp/apps/phpmyadmin3.5.1/">
  2.     Options Indexes FollowSymLinks MultiViews
  3.     AllowOverride all
  4.         Order Deny,Allow
  5.     Allow from all
  6.     Allow from 127.0.0.1
  7. </Directory>

修改保存后,一定要记得重启wampserver哟。接下来就应该搞定了吧。


1 0
原创粉丝点击