Apache for win x64 安装步骤

来源:互联网 发布:知否 书包网 编辑:程序博客网 时间:2024/06/03 19:05
  1. 进入 Apache官网

  2. download_1

  3. download_2

  4. download_3

  5. 将压缩包解压出来,进入 Apache24 后得到

    result

  6. 进入 conf 文件夹,打开 httpd.conf

    httpd.conf

  7. Define SRVROOT 这一项里的路径改为解压出来后 Apache24 的路径

    root_path

  8. 保存,退出

  9. bin 目录下,找到 httpd.exe ,按住 Shift 键+鼠标右键,选择复制为路径

    copy_path

  10. 以管理员身份打开 cmd ,将路径复制进去,然后输入 -k install -n apache(注意-k前面的空格

    install

  11. 出现以上画面就说明安装成功了,若在 Errors reported here must be corrected before the service can be started. 后面有错误出现,则先把 apache 卸载,将错误排除后再重新安装

  12. 卸载 apache 的方法,以管理员身份运行 cmd ,输入 sc delete apache

    delete

  13. 安装失败可能的原因

    问题一:80端口被占用

    修改在 conf 目录下的 httpd.conf 文件,将 Listen 80 的80改为其他不被占用的值

    port_80

    问题二:443端口被占用

    进入 conf/extra 目录下,找到 httpd-ahssl.confhttpd-ssl.conf 两个文件,将这里面的443端口全部换为其他不被占用的端口(如442等)

    port_443

  14. 保存退出后,重新安装 Apache 即可。

原创粉丝点击