码迷,mamicode.com
首页 > 其他好文 > 详细

nginx-stub状态模块的添加

时间:2018-08-24 13:18:39      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:cti   keepalive   proc   pre   curl   ble   with open   reading   serve   

nginx-stub模块
  • 编译

    -bash-4.1# ./nginx -V
    nginx version: nginx/
    built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) 
    built with OpenSSL 1.0.1e-fips 11 Feb 2013
    TLS SNI support enabled
    configure arguments: --prefix=/usr/local/nginx --with-http_ssl_module --with-http_stub_status_module
  • 配置
-bash-4.1# cat ../nginx.conf
worker_processes  1;

events {
    worker_connections  1024;
}

http {
     include mime.types;
     default_type application/octet-stream;
     sendfile on;
     keepalive_timeout 65;
     include  test/*;
}
-bash-4.1# cat status.conf 
server {
     listen 80;
     server_name etiantian.com;
     location / {
       stub_status on;
       access_log off;
     }
}
  • 测试
-bash-4.1# curl etiantian.com
Active connections: 1 
server accepts handled requests
 43 43 43 
Reading: 0 Writing: 1 Waiting: 0 

nginx-stub状态模块的添加

标签:cti   keepalive   proc   pre   curl   ble   with open   reading   serve   

原文地址:http://blog.51cto.com/13747009/2163781

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!