首先,需要打开httpd.conf中的mod_status模块,具体步骤为:
1.用VI打开文件/etc/httpd/conf/httpd.conf
2.在VI命令模式下,输入/server-status进行查找,直到看到下面文字
#
# Allow server status reports generated by mod_status,# with the URL of http://servername/server-status# Change the ".example.com" to match your domain to enable.#<Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from all</Location>#上面这一段文字默认是屏蔽的,需要去掉左边的屏蔽符号#
Allow from all这一句all是我自己修改的,如果需要限制的话自行输入ip地址
之后重启httpd
[root@asg11 conf]# service httpd restart
Stopping httpd: [ OK ]Starting httpd: [ OK ]在浏览器地址栏输入http://asg11.watson.ibm.com/server-status来查看服务器信息,结果是这样
2016年3月1日9:30:14