【问题标题】:How do i get rid of the 403-forbidden-error on WAMP host?如何摆脱 WAMP 主机上的 403-forbidden-error?
【发布时间】:2015-08-13 07:19:45
【问题描述】:

我正在开发我的第一个网站并在 WAMP 服务器上启动它,我正在运行 Windows 10,它工作正常,直到操作系统有更新;现在我收到一条 403 禁止消息;如何摆脱 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 

谢谢!

【问题讨论】:

标签: php apache xhtml wamp


【解决方案1】:

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

检查 Windows 更新没有将 HOSTS 文件恢复为默认值

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

至少应该包含:-

127.0.0.1  localhost
::1  localhost

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

【讨论】:

    猜你喜欢
    • 2023-03-24
    • 2013-11-01
    • 2011-09-25
    • 1970-01-01
    • 2018-10-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-17
    相关资源
    最近更新 更多