bco 发表于 2018-11-19 09:19:17

apache 安装遇到的问题

  1、首先下载 apache 的 zip 包,并解压到指定的路径下;(如:E:\Apache24)
  下载 apache 路径:http://www.apachehaus.com/cgi-bin/download.plx
  2、使用管理员的身份进入 doc 界面,进入 apache 的bin目录,输入 httpd.exe -k install
  
  3、报出错:Testing httpd.conf....
  Errors reported here must be corrected before the service can be started.
  httpd.exe: Syntax error on line 40 of E:/Apache24/conf/httpd.conf: ServerRoot must be a valid directory
  是因为路径找不到,需要修改 httpd.conf文件中的 Define SRVROOT 指定 apache 的路径。
  4、报出错:Testing httpd.conf....
  Errors reported here must be corrected before the service can be started.
  (OS 10013)以一种访问权限不允许的方式做了一个访问套接字的尝试。: AH00072: make_sock: could not bind to address [::]:80
  (OS 10013)以一种访问权限不允许的方式做了一个访问套接字的尝试。: AH00072: make_sock: could not bind to address 0.0.0.0:80
  AH00451: no listening sockets available, shutting down
  AH00015: Unable to open logs
  是因为端口被占用,需要修改 httpd.conf文件中的 Listen 、ServerName 修改端口号,这里把 80 设置为 8080。
  

  5、报出错:Testing httpd.conf....
  Errors reported here must be corrected before the service can be started.
  (OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。: AH00072: make_sock: could not bind to address 0.0.0.0:443
  AH00451: no listening sockets available, shutting down
  AH00015: Unable to open logs
  是因为监听端口占用问题,由于安装了Skype,开着 Skype 占用了 443 端口;
  需要修改 Apache24\conf\extra 下的 httpd-ahssl.conf 、httpd-ssl.conf 在这里把 443 修改为 442 。
  

  6、安装成功了,出现如下:

  

  7、点击 ApacheMonitor.exe ,启动 apche 成功; 在浏览器访问 localhost:8080,成功出现 apache 的界面 。
  

  




页: [1]
查看完整版本: apache 安装遇到的问题