Apache无法在Windows中启动后台

时间:2015-01-17 12:19:07

标签: windows apache batch-file cmd

我想在后台运行apache。

apache-start.bat 文件:

@echo off
cd C:\wnmp\bin\apache\bin\
@start /b "apache" "httpd.exe"
exit
当我运行这个bat文件时,

apache工作正常。但仍会出现命令行窗口。当我关闭那个窗口时,apache会停止。我想在后台运行。

操作系统:Windows 10(技术预览版)

Apache:2.4

1 个答案:

答案 0 :(得分:0)

您需要将apache作为服务运行:http://httpd.apache.org/docs/2.4/platform/windows.html#winsvc

有很多方法可以从批处理开始隐藏进程: https://superuser.com/questions/62525/run-a-batch-file-in-a-completely-hidden-way