apache服务器搭建教程_apache本地服务器

apache服务器搭建教程_apache本地服务器一 下载安装配置服务器 1 下载 1 百度搜索 downlaod apache 2 选择 windows 版本 http httpd apache org download cgi 3 http httpd apache org docs current platform windows html down 4 下载 下载解压后 目录结构 2 配置 配置文件位置

一、下载安装配置服务器

1.下载

1.百度搜索 downlaod apache

2.选择windows版本

http://httpd.apache.org/download.cgi

3.

http://httpd.apache.org/docs/current/platform/windows.html#down

4.下载

下载解压后,目录结构

2..配置

配置文件位置:Apache24/conf/httpd.conf

1.配置根目录(SRVROOT)

${SRVROOT}是取SRVROOT变量的意思。

2.配置端口

3.配置资源目录

二、运行Apache服务

apache软件,可以开启多个服务(服务器),默认软件内没有服务(服务器),所以需要先创建服务(服务器)。

1. 创建服务(服务器)

bin目录中的 httpd.exe程序,使用dos命令(管理员身份启动)启动 httpd.exe 程序并创建服务器

参照文档(第一步中的3步页面)

http://httpd.apache.org/docs/current/platform/windows.html#down

httpd.exe -k install

2.启动服务(服务器)。

bin目录中命令行启动

httpd

或者使用 bin目录中的 ApacheMonitor.exe 软件

3.可能出现问题用问题

有可能会出现接口被占用

解决办法:

3.1 运行netstat -ano查看端口占用情况

3.2 运行tasklist |findstr 3428 查看进程编号(PID)为3428 的信息

3.3终止进程。 taskkill /pid 3428 /f

任务管理器也可以使查看pid

三、访问

四、设置开机启动

bat文件内容

net start Apache2.4

bat文件设置开机启动:https://blog.csdn.net/tscaxx/article/details/108662581

编程小号
上一篇 2025-01-16 11:17
下一篇 2025-02-06 15:27

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/hz/119635.html