“安装Apache”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
第9行: 第9行:
 
ServerRoot "${SRVROOT}"
 
ServerRoot "${SRVROOT}"
 
</syntaxhighlight>
 
</syntaxhighlight>
 
  
 
配置监听端口
 
配置监听端口
第26行: 第25行:
 
</Directory>
 
</Directory>
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
  
  
第33行: 第33行:
 
附从服务中卸载:<syntaxhighlight lang="powershell">
 
附从服务中卸载:<syntaxhighlight lang="powershell">
 
E:\record\2022\8\9\httpd-2.4.54-o111p-x86-vs17\Apache24\bin>httpd.exe -k uninstall -n "Apache24"
 
E:\record\2022\8\9\httpd-2.4.54-o111p-x86-vs17\Apache24\bin>httpd.exe -k uninstall -n "Apache24"
</syntaxhighlight>
+
</syntaxhighlight>此时可以运行 GUI 程序 ApacheMonitor.exe 控制 Apache服务 start、stop
 +
 
 +
访问 http://localhost 测试是否安装成功
  
 
*Apache 的目录结构说明
 
*Apache 的目录结构说明
 
*Httpd.exe 的详细应用
 
*Httpd.exe 的详细应用

2022年8月9日 (二) 09:42的版本

  • 安装 Apache 软件
    1. 获取 Apache 安装软件
    2. 修改 httpd.conf

配置 Apache 主程序根目录

Define SRVROOT "E:/record/2022/8/9/httpd-2.4.54-o111p-x86-vs17/Apache24"
ServerRoot "${SRVROOT}"

配置监听端口

#Listen 12.34.56.78:80
Listen 80

配置服务器根目录

DocumentRoot "${SRVROOT}/htdocs"

配置服务器根目录下子目录的访问权限

<Directory "${SRVROOT}/htdocs">
    ...
</Directory>


安装 Apache 到服务,以管理员身份运行

E:\record\2022\8\9\httpd-2.4.54-o111p-x86-vs17\Apache24\bin>httpd.exe -k install -n "Apache24"

附从服务中卸载:

E:\record\2022\8\9\httpd-2.4.54-o111p-x86-vs17\Apache24\bin>httpd.exe -k uninstall -n "Apache24"

此时可以运行 GUI 程序 ApacheMonitor.exe 控制 Apache服务 start、stop

访问 http://localhost 测试是否安装成功

  • Apache 的目录结构说明
  • Httpd.exe 的详细应用