【发布时间】:2019-01-12 04:33:03
【问题描述】:
我在我的 PC 中使用 windows 10 设置 wamp 服务器。 Wamp 启动正常。我运行链接 localhost ok。
我创建了一个虚拟主机abcd.test成功但是它不能运行。
我检查了 apache_error 日志:
[Sat Aug 04 21:52:05.462895 2018] [mpm_winnt:notice] [pid 13960:tid 628] AH00422: Parent: Received shutdown signal -- Shutting down the server.
[Sat Aug 04 21:52:07.465001 2018] [mpm_winnt:notice] [pid 12684:tid 700] AH00364: Child: All worker threads have exited.
[Sat Aug 04 21:52:07.489996 2018] [mpm_winnt:notice] [pid 13960:tid 628] AH00430: Parent: Child process 12684 exited successfully.
[Sat Aug 04 21:52:08.278895 2018] [mpm_winnt:notice] [pid 16620:tid 752] AH00455: Apache/2.4.27 (Win64) PHP/5.6.31 configured -- resuming normal operations
[Sat Aug 04 21:52:08.278895 2018] [mpm_winnt:notice] [pid 16620:tid 752] AH00456: Apache Lounge VC15 Server built: Jul 7 2017 12:46:00
[Sat Aug 04 21:52:08.278895 2018] [core:notice] [pid 16620:tid 752] AH00094: Command line: 'D:\\wamp64\\bin\\apache\\apache2.4.27\\bin\\httpd.exe -d D:/wamp64/bin/apache/apache2.4.27'
[Sat Aug 04 21:52:08.282891 2018] [mpm_winnt:notice] [pid 16620:tid 752] AH00418: Parent: Created child process 17360
[Sat Aug 04 21:52:08.564039 2018] [mpm_winnt:notice] [pid 17360:tid 728] AH00354: Child: Starting 64 worker threads.
我运行 cmd 命令行:
'D:\\wamp64\\bin\\apache\\apache2.4.27\\bin\\httpd.exe -d D:/wamp64/bin/apache/apache2.4.27'*
文件 httpd:
#
# 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 0.0.0.0:80
Listen [::0]:80
...
文件虚拟主机:
# Virtual Hosts
#
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName wordpress.test
DocumentRoot "d:/projects/wordpress"
<Directory "d:/projects/wordpress/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
请帮帮我!
【问题讨论】:
-
您应该将命令提示符文本作为文本(格式化为代码)发布,此处没有文本图像!
-
您的配置中可能有两次
Listen *:80。 Apache 每个端口只能绑定一次。或者已经有另一个可执行文件绑定相同的端口。在问题中添加您的配置,否则我们只能猜测。 -
当您从 hdd 移动到 ssd 并安装新的 wamp 时会发生此错误。 Wamp 运行并显示绿色。您要共享配置什么?
-
httpd.conf 文件和任何
Include.conf 文件。Listen语句在这些文件中。 -
我刚刚更新了描述文件
httpd.conf和httpd-vhost.conf
标签: apache localhost wamp wampserver