1.安装Visual Studio Redistributable Packages
2.解压,修改配置文件
3.安装(dos窗口可看到报错,……\Apache24\bin\httpd.ext,点击闪退,不知道哪有错误)
dos窗口(管理员权限),进入bin目录,httpd.exe -k install -n apache
1.下载
https://httpd.apache.org/
https://www.apachehaus.com/cgi-bin/download.plx
2.安装Visual Studio Redistributable Packages。下载安装对应的Visual Studio Redistributable Packages,一路下一步安装
3.修改配置文件
SRVROOT 为apache的解压目录,HTTP_PORT,SSL_PORT可能会有端口冲突,直接修改,也可通过报错查看2查看端口是否冲突
4.安装启动
httpd.exe -k install -n apache
5.验证
http://localhost:8899/,浏览器打开该网址,如下图,则安装成功
报错:
1.Could not reliably determine the server’s fully qualified domain name, using fe80::e8fb:3f86:fc5d:4cf7. Set the ‘ServerName’ directive globally to suppress this message
配置文件增加ServerName localhost:8899,重新打开dos窗口(关闭之前的),输入httpd
2.通常每个套接字地址(协议/网络地址/端口)只允许使用一次。
端口被占用1.杀进程2.改端口
查看端口是否被占用,在任务管理器中查看哪个程序使用该pid号,如果关闭,在任务管理器中结束进程
打开……\Apache24\conf下的httpd.conf,修改保存后,win+R进入bin目录,httpd
删除服务
win+R sc delete apache