首頁 > 運維 > linux運維 > 主體

ngix_http_stub_status_module

巴扎黑
發布: 2017-06-23 14:13:04
原創
1608 人瀏覽過

1.ngx_http_stub_status_module 是一個 Nginx 的內建 HTTP 模組,可以提供 Nginx 的狀態資訊。預設這個模組是不被編譯進來的,所以在編譯Nginx 時要指定載入該模組#--with-http_stub_status_module

2.先檢查nginx是否安裝ngx_http_stub_status_module

#如果沒有安裝,需要重新編譯。

# nginx  -V | grep http_stub   

ngx_http_stub_status_module (static)

# nginx   -vTengine version: Tengine/2.1.1 (nginx/1.6. 2) 

#3,首先在nginx

server段配置對應的資訊

#server {

<strong></strong>

#    listen  80;

    server_name  xxx;

    location/

ngx_status   自訂模組名稱

    {

       ; 開啟狀態存取

        access_log off;    #allow ;

#    可以設定需要那些主機存取

    #deny all;<strong></strong>    }

}

#4,重新載入

nginx,存取測試

# service nginx reload

 <strong> </strong>curl 127.0.0.1:80/ngx_status

<strong></strong>Active connections: 135  #Active connections: 135  

server accepts handled requests request_time

卷#Reading: 0 Writing: 12 Waiting: 123說明:<br>

<strong>#Active connections: 135</strong>  #//#正在活躍的連線數##server accepts handled requests  13711907 25715823 5175039843  #處理了13711907#次連接,創建

###25715823######次握手,共#######5175039843##### #請求。 ##############################Reading: 0 Writing: 1 Waiting: 1  ###        ####### Reading :######讀取客戶端######header######數,######Writing:######傳回客戶端######header ######數,######Waiting:######請求完成,等待下次連線。 #########
 <br>
登入後複製

以上是ngix_http_stub_status_module的詳細內容。更多資訊請關注PHP中文網其他相關文章!

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!