我希望在带有wamp的PC上设置一个用于测试目的的网页(我知道不推荐这样做)。
我遵循了这个指南:https://www.youtube.com/watch?v=b50hB7cfsfg
但是如果我改变httpd中的默认设置。配置:listen 0.0.0.0:80
我的IP:listen xxx.x.xxx.212
和ServerName localhost:80
到toServerName xxx.x.xxx.212
和
<Directory />
AllowOverride none
Require all denied
</Directory>
到
<Directory />
Order Deny,Allow
Deny from all
</Directory>
然后重新启动wamp,我得到以下错误:
There is a syntax error in Apache conf files.
AH00526: Syntax error on line 70 of C:/wamp64/bin/apache/apache2.4.54.2/conf/httpd.conf:
Port must be specified
我应该怎么做来纠正这个错误?
我发现很多题目都有类似的问题,但都过时了。
(我安装了wamp 3。3.0)
1条答案
按热度按时间amrnrhlw1#
将
:80
放回listen
指令,其中需要指定端口。你不需要具体的IP地址。
listen 0.0.0.0:80
可以正常工作,这意味着在端口80上侦听所有IP地址。