nginx-stub状态模块的添加

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了nginx-stub状态模块的添加相关的知识,希望对你有一定的参考价值。

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状态模块的添加的主要内容,如果未能解决你的问题,请参考以下文章

添加到后台堆栈时如何维护片段状态?

VSCode自定义代码片段13——Vue的状态大管家

VSCode自定义代码片段13——Vue的状态大管家

VSCode自定义代码片段13——Vue的状态大管家

如何使用模块化代码片段中的LeakCanary检测内存泄漏?

postman添加断言