切换导航
京西&周倍庆&程序猿
首页
前端
JavaScript
jQuery
AngularJS
Bootstrap
后端
Nginx
MySQL
PHP
系统
Mac
Centos
杂谈
工作
娱乐
爱情
梦想
查看Nginx运行的统计数据
浏览量:
118
发布时间:
2015-12-21
发布人:
京西
文章由
京西
原创,转载时请在文章底部添加如下内容
本文转载自京西的个人博客,原文链接为
http://www.siguoya.name/home/article/43
相关推荐
###安装 Nginx中的stub_status模块主要用于查看Nginx的一些状态信息. 本模块默认是不会编译进Nginx的,如果你要使用该模块,则要在编译安装Nginx时指定 ```shell ./configure ––with-http_stub_status_module ``` ###检查 查看已安装的 Nginx 是否包含 stub_status 模块 ```shell nginx -V ``` ###配置 在你的nginx.conf文件中添加一个server即可,内容如下 ``` server{ listen 80; server_name www.yourdomain.com yourdomain.com; location /status { stub_status on; access_log off; } }``` 然后重启nginx,通过 www.yourdomain.com/status 查看即可 ``` Active connections: 1 server accepts handled requests 10 10 20 Reading: 0 Writing: 1 Waiting: 0 ```