如何摆脱WAMP主机上的403-forbidden-error?

时间:2015-05-30 12:38:01

标签: php apache xhtml wamp

我正在开发我的第一个网站并在WAMP服务器上启动它,我正在运行Windows 10,它工作正常,直到操作系统有更新;现在我收到403 Forbidden消息;如何摆脱WAMP主机上的403-forbidden-error?

ServerAdmin admin@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80

我是否需要进行任何更改?

ServerRoot "c:/wamp/bin/apache/apache2.2.22"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80 

谢谢!

1 个答案:

答案 0 :(得分:0)

使用预览版Windows作为开发环境有点危险。

检查Windows更新是否未将HOSTS文件恢复为默认值

C:\windows\system32\drivers\etc\hosts

至少应包含: -

127.0.0.1  localhost
::1  localhost

确保第1列中的#没有注释掉它们