普通Apache的安装与卸载

Apache安装与卸载
ctrl+F快捷查找

1、下载apache
  64位解压 官网:http://httpd.apache.org/
  文件使用记事本或者sublime
2、修改
  打开apache目录下的conf文件,找到httpd.conf文件(这里将使用editplus打开)
  Apache中httpd.conf配置问题
  找到ServerRoot
  修改为目录与你的apache安装目录相同。本例中apache安装在D:/apache/apache24。

3、修改端口
  找到listen 80将其改为listen 8080。

4、下面这两行改成自己工作空间目录
  #DocumentRoot "${SRVROOT}/htdocs"
  #<Directory "${SRVROOT}/htdocs">

  例如:

       DocumentRoot "D:\安装盘\HBuilder\lilin"
     <Directory "D:\安装盘\HBuilder\lilin">

5、另外把下列注释掉

  #LoadModule ssl_module modules/mod_ssl.so

6、一定要记住以管理员的身份打开
  cd D:\安装盘\HBuilder\Apache24\bin
  启动服务
  httpd.exe -k install -n apache
7、成功了
  出现这个:
  Installing the 'apache' service
  The 'apache' service is successfully installed.
  Testing httpd.conf....
  Errors reported here must be corrected before the service can be started

8.停止Apache
  执行命令:
  net stop Apache2.4

9、卸载服务
  sc delete apache2.4

最终访问本服务器

  localhost://60

 

猜你喜欢

转载自www.cnblogs.com/despatch/p/11368822.html
今日推荐