Apache,版本2.2.8,安装完成后,进行相关测试; 可能是权限不足引起的问题。
解决方法:
复制代码代码示例:
<Directory />
Options FollowSymLinks AllowOverride None Order deny,allow Deny from all </Directory> 由于配置了php后,此处“Deny from all”为拒绝一切连接。 把此行修改为 “Allow from all”,即可解决问题。
修改后的代码为:
复制代码代码示例:
<Directory />
Options FollowSymLinks AllowOverride None Order deny,allow allow from all </Directory> 浏览器里打开http://localhost,显示it works!问题解决。
总结: 附,另外一个apache 403错误的例子。
apache 403错误,显示信息如下:
HTTP 错误 403 - 禁止访问
去掉显示友好信息的钩后显示Forbidden You don't have permission to access \ on this server.
复制代码代码示例:
<Directory />
Options FollowSymLinks AllowOverride None Order deny,allow deny from all Satisfy all </Directory>
然后试着把deny from all中的deny改成了allow,保存后重起了apache,访问测试网站完全正常了。
解决方法。
复制代码代码示例:
<Directory "E:/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 # [url]http://httpd.apache.org/docs/2.2/mod/core.html#options[/url] # 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 Deny from all Allow from 127.0.0.1 </Directory> 红色部分更改为 Allow from all ,也就是所有访问允许通过。 (责任编辑:IT) |