nginx開啓監控模塊

Nginx中的stub_status模塊主要用於查看Nginx的一些狀態信息.

本模塊默認是不會編譯進Nginx的,如果你要使用該模塊,則要在編譯安裝Nginx時指定:

# ./configure --with-http_stub_status_module

# make

# make install

 

安裝完成後,修改conf/nginx.conf

 location /status {
            root   html;
            index  index.html index.htm;
            stub_status on;
}

 

重新加載nginx

# ./nginx -s reload

注意這裏配置的是/status,所以監控頁面訪問http://localhost/status

 

頁面顯示如

Active connections: 1002
server accepts handled requests       
 29977 29977 30115                           
Reading: 19 Writing: 983 Waiting: 0

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章