您的位置:首页 > 运维架构 > Apache

Win2008R2安装apache2.4.29 win64并开启server-status和server-info页面

2018-02-24 17:11 609 查看

环境描述:

操作系统:win2008R2

Apache版本:httpd-2.4.29-Win64-VC15

问题描述:

这个问题在网上有解答,但是问题解决的对应版本比较老无法在2.4.29版本上成功解决,apache无法显示server-status和server-info的信息。

问题解决方案:

1. 下载 httpd-2.4.29-Win64-VC15

下载地址 当然也可以自己在百度上自己搜索下载。

2. 解压httpd-2.4.29-Win64-VC15.zip并将Apache24复制到c盘或者其他盘的根目录。

3. 下载并安装VC 2015

由于2.4版本依赖vc15,所以需要下载并安装vc2015

4. 修改配置文件

修改C:\Apache24\conf\httpd.conf文件:

将原来文件中的:

# Required modules: mod_authz_core, mod_authz_host,
#                   mod_info (for the server-info handler),
#                   mod_status (for the server-status handler)
#将required modules中对应的模块在conf文件中找到并去掉前面的“#”

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80
#这里localhost可以换成你的域名


修改C:\Apache24\conf\extra\httpd-info.conf文件

修改Location标签中的内容修改后如下所示:

<Location /server-status>
SetHandler server-status
Order deny,allow
#Deny from all
Allow from all
</Location>

ExtendedStatus On

<Location /server-info>
SetHandler server-info
Order deny,allow
#Deny from all
Allow from all
</Location>


5.安装apache

按住菜单键+r打开搜索框,输入cmd,同时输入:

cd C:\Apache24\bin#这个路径对应你自己的
httpd  help#获得帮助
httpd -k install #安装


6.启动apache服务

httpd -k start #启动服务


这个时候访问你的域名和/server-status和/server-info就可以获取数据了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: