在Win10上安装Apache2.44

下载地址:https://www.apachelounge.com/download/VS16/binaries/httpd-2.4.41-win64-VS16.zip

如果以上地址失效请到 https://www.apachelounge.com/download/ 寻找最新稳定版本下载。

下载到本地解压后,比如为C:\Install\Apache24,打开C:\Install\Apache24\conf\httpd.conf文件,找到Define SRVROOT一行,将你刚才的解压地址写入引号中,如下图红色字体部分显示:

# least PidFile.
#
Define SRVROOT "C:/Install/Apache24"

ServerRoot "${SRVROOT}"

#
# Mutex: Allows you to set the mutex mechanism and mutex file directory

之后以管理员身份打开cmd,到C:\Install\Apache24\bin目录,输入:

C:\Windows\system32>cd C:\Install\Apache24\bin

C:\Install\Apache24\bin>httpd.exe -k install
Installing the 'Apache2.4' service
The 'Apache2.4' service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.

C:\Install\Apache24\bin>httpd.exe -k start

C:\Install\Apache24\bin>

以上httpd.exe -k install 一句是安装apche到系统服务,httpd.exe -k start 一句是启动httpd服务

之后在浏览器窗口输入 localhost:80,看到 It works!就算安装成功了。

--END-- 2020年1月1日16点27分
posted @ 2020-01-01 16:24  逆火狂飙  阅读(445)  评论(0)    收藏  举报
生当作人杰 死亦为鬼雄 至今思项羽 不肯过江东