在Apache上出现错误提示“You don’t have permission to access / on this server.”之前也遇见过这类似的问题,现在写出文章做个记录也好。
这是权限分配出现了问题,其实我们只要修改以下文件即可,
找到http.conf文件搜索以下代码关键字
包围在
[code]<Directory />
</Directory>[/code]
中的
[code]Allow from 127.0.0.1[/code]
修改成或添加
[code]Allow from all[/code]
还没有结束继续找以下类似的代码段:
[code]<Directory “c:/wamp/www/”>
#
# Possible values for the Options directive are “None”, “All”,
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that “MultiViews” must be named *explicitly* — “Options All”
# doesn’t give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be “All”, “None”, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all
#
# Controls who can get stuff from this server.
#
# onlineoffline tag – don’t remove
Order Deny,Allow
Allow from all
</Directory>[/code]
再次添加
[code]Allow from all[/code]
如果你是在购买别人的虚拟机上面也出现了以上问题有可能是你删除或者移动了文件造成的,一般购买虚拟机不存在以上问题都是已经分配好了的。
(www.xgllseo.com)转载请注明,请尊重版权。