1, httpd
编辑/etc/httpd/conf/httpd.conf ,解开关于server-status的注释,并修改Allow 指令允许所有ip访问
重启httpd,使服务生效
2, tomcat
修改配置文件: conf/tomcat-users.xml
#admin-gui -使用此角色进行图形化Web界面。
#admin-script -在脚本Web界面中使用此角色。
wang@wang-T58-V:~/unpack$ cat apache-tomcat-8.0.45/conf/tomcat-users.xml
<?xml version='1.0' encoding='utf-8'?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
version="1.0">
<role rolename="manager-gui"/>
<user username="tomcat" password="123456" roles="manager-gui"/>
</tomcat-users>
##也可以直接修改:webapps/manager/META-INF/context.xml,把127.0.0.1上下文注释掉
[wang@c6 opt]# cat apache-tomcat-8.5.54/conf/Catalina/localhost/manager.xml
<Context privileged="true" antiResourceLocking="false" docBase="${catalina.home}/webapps/manager">
<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="^192.168.*$" />
</Context>
3, nginx
http://nginx.org/en/docs/http/ngx_http_stub_status_module.html
[root@cdh-node1 vagrant]# cat /etc/nginx/conf.d/default.conf
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
include /etc/nginx/default.d/*.conf;
location /status {
stub_status;
}
}