Apache-You don't have permission to access / on this server. Apache, win 7

在win7环境下,apche报出You don't have permission to access / on this server.禁止访问,应该如何解决呢?可以试试下面的方法

第一:寻找配置文件:apache\apache2.2.22\conf\httpd.conf

(修改配置文件之前,记得先做好备份,以免方案不对,影响原来的配置)

第二:用编辑器打开,寻找:

#LoadModule rewrite_module modules/mod_rewrite.so

第三:删除本行开头的“#”,使其变成:

LoadModule rewrite_module modules/mod_rewrite.so

第四:将

#   onlineoffline tag - don't remove
    Order Deny,Allow
    Deny from all
    Allow from 127.0.0.1

修改为

#   onlineoffline tag - don't remove
    Order Allow,Deny
    Allow from all

第五:重启服务,再次访问。

 

如果wamp的phpMyAdmin无法访问

打开 XXX/wamp/alias/phpmyadmin.conf 文件,

<Directory "F:/Software/wamp/alias/phpmyadmin3.5.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory

修改为:

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

重启wamp.

你可能感兴趣的:(Apache-You don't have permission to access / on this server. Apache, win 7)