Windows下Apache服务器的搭建

–>

下载

官网下载地址

x86或者 x64

下载好后解压到自己想要的目录


配置


修改 conf / httpd.conf文件中的路径和端口

这里的路径改为安装目录

(我这里改的8088端口,有些人可能不需要改端口)


安装时如果出现(OS 10048)错误

需要修改以下两个文件中的 443 端口为 442

Notepad++ 批量替换443为442就行


以==管理员==身份运行cmd安装apache服务

  • 进入apache/bin目录

  • 执行 httpd -k install 命令 安装 apache服务

  • 执行 httpd – k start 命令启动服务

  • 执行 httpd -k stop 命令停止服务

也可以用bin目录下的 ApacheMonitor.exe 来启动、停止 服务

双击ApacheMonitor.exe 桌面右下角会有


服务启动后访问 http://127.0.0.1:8088/index.html或者http://localhost:8088/index.html 访问服务器
出现如下界面表示服务器配置成功

一般 根目录在 Apache24 \ htdocs文件夹下


卸载

进入到bin目录下执行命令

sc delete (服务名) :
sc delete apache2.4

或者
httpd -k uninstall -n apache2.4

解决端口被占用的问题

通过端口找到PID

netstat -ano | find “1099”

通过PID找到进程

tasklist | find “9280”

关闭进程

*taskkill /f /t /im java.exe*

完毕

本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。

© 版权声明

相关文章