一、Apache下载

下载流程

  1. 下载地址:http://httpd.apache.org/ 选择不同操作系统下的HTTP Server下载;
  2. windows -> Lastest aviriable version模块下,点击File For Microsoft windows;
  3. 下载选项中选择第三方:ApahceHuas,并选择的对应的windows x32/x64进行下载。

操作图示:

请输入图片描述

请输入图片描述

二、Apache安装(windows)

  1. 设置根目录或端口
    1.1 进入zip解压后的目录,打开conf目录下的httpd.conf文件;
    1.2 修改目录: Define SRVROOT "E:\httpd-Server\Apache24";
    1.3 修改端口: Listen 8080
  2. 以管理员身份打开cmd,切换至Apache解压后的bin目录,执行步骤3、4指令;
  3. httpd.exe -k install [-n 'definedName'] 初始化; (-n 命令是自定义服务器命)
  4. httpd.exe -k start 启动服务;
  5. 浏览器地址输入 http://localhost:8080 用来确认是否启动;
  6. httpd.exe -k stop 停止服务。
  7. 常用指令使用
    7.1 重启服务:httpd.exe -k restart
    7.2 卸载服务: httpd.exe -k uninstall
    7.2 查看版本:httpd.exe -v

    1.3 修改端口: Listen 8080

    1. 以管理员身份打开cmd,切换至Apache解压后的bin目录,执行步骤3、4指令;
    2. httpd.exe -k install [-n 'definedName'] 初始化; (-n 命令是自定义服务器命)
    3. httpd.exe -k start 启动服务;
    4. 浏览器地址输入 http://localhost:8080 用来确认是否启动;
    5. httpd.exe -k stop 停止服务。
    6. 常用指令使用
      7.1 重启服务:httpd.exe -k restart
      7.2 卸载服务: httpd.exe -k uninstall
      7.2 查看版本:httpd.exe -v

原文链接:https://blog.csdn.net/qq_41107529/article/details/88361524

Last modification:October 10, 2023
If you think my article is useful to you, please feel free to appreciate