---
title: "nginx学习记录"
author: "heipark"
date: "2015-04-28T17:42:28Z"
tags: []
categories: ["企业架构"]
slug: "nginx"
draft: false
lastmod: "2015-04-28T17:45:17Z"
id: 2206880
url: "https://heipark.iteye.com/blog/2206880"
---

# 1. 使用监控页面

 

## 安装：

安装时添加--with-http\_stub\_status\_module配置，命令如下：

 

./configure --prefix=&lt;your\_path&gt; --with-http\_stub\_status\_module  
make  
make install

## 配置：

conf/nginx.conf添加：

 

location /nginx\_status {  
stub\_status on;  
access\_log off;  
#allow x.x.x.x  
#deny all;  
}

## 效果

浏览器访问：http://x.x.x.x/nginx\_status，效果如下：

 

Active connections: 1  
server accepts handled requests request\_time  
2621 2621 2621 321347  
Reading: 0 Writing: 1 Waiting: 0