nginx 配置笔记

1.nginx 监控状态统计

cd /opt/nignx/nginx-1.3.8

./configure --prefix=/usr/local/nginx --with-http_stub_status_module #开始状态监控模块

make

make install 

cd /usr/local/nginx/config
sudo vim nginx.config

server{
        listen       80;
        server_name  localhost;
        charset      utf-8;
        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   /opt/nignx/file;
           # index  index.html index.htm;
            autoindex on;#可以访问目录 
} location
/status { stub_status on; access_log off; } }

 

 红色部分

http://localhost/status

Active connections: 10 #nginx 正处理的活动连接数
server accepts handled requests 45 45 90
#nginx共处理了 45个连接 ,nginx共成功创建 45次握手 请求丢失数=(握手-连接),可以看出,我们没丢请求;总共处理了90次请求
Reading: 0 Writing: 1 Waiting: 0

##Reading :nginx读取到客户端的Header信息数。
#Writing : nginx返回给客户端的Header信息数。
#Waiting : Nginx已经处理完正在等候下一次请求指令的驻留连接.开启keep-alive的情况下,这个值等于active–(reading+writing)。

 

 

 

 

 

 

posted @ 2012-11-16 11:24  montya  阅读(179)  评论(0编辑  收藏  举报