人妖在线一区,国产日韩欧美一区二区综合在线,国产啪精品视频网站免费,欧美内射深插日本少妇

新聞動態(tài)

nginx?添加http_stub_status_module模塊

發(fā)布日期:2022-07-20 19:45 | 文章來源:源碼之家

1. stub_status 作用說明

編譯選項作用
–with-http_stub_status_moduleNginx的客戶端狀態(tài)

2.查看現(xiàn)有 nginx 編譯參數(shù)

./nginx -V
# 如果沒有我們需要的模塊,例如本次試驗添加的 –with-http_stub_status_module ,那么則需要重新編譯安裝一下

3.使用參數(shù)重新配置configure,在原有基礎(chǔ)上添加上 --with-http_stub_status_module

configure 文件是在安裝包目錄下的文件,具體可參考 centos 7 安裝 nginx

./configure --prefix=/usr/local/nginx --with-http_realip_module --with-http_ssl_module --with-pcre --with-stream --with-http_stub_status_module

4.將原來的 nginx 文件備份

cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx.bak

5. 編譯

make
# 這里是需要 make 編譯,不用 make install

6. 替換nginx二進制文件

# 找到 nginx 安裝包目錄 /root/nginx-1.10.1/objs ,將 nginx 文件復(fù)制到原本的 /usr/local/nginx/sbin/nginx
cp /root/nginx-1.10.1/objs/nginx /usr/local/nginx/sbin/

7.重新啟動nginx,查看編譯參數(shù)

./nginx -s reload
./nginx -V

8. 參考官網(wǎng)

地址:https://nginx.org/libxslt/en/docs/http/ngx_http_stub_status_module.html

8.1 修改配置文件

文件目錄:/usr/local/nginx/conf

# 在文件中添加新的 location
location /nginx_status {
	stub_status;
}
# 解釋說明:
	nginx_status	這是自定義命名的,訪問的時候添加這個字段訪問
	stub_status;	這個是固定參數(shù)

8.2 瀏覽器訪問

http://192.168.169.131/nginx_status
# 訪問內(nèi)容結(jié)果如下圖

# 解釋說明:
1)Active connections-活躍連接數(shù)
        The current number of active client connections including Waiting connections.
(2)accepts-已接受的客戶端連接總數(shù)
        The total number of accepted client connections.
(3)handled-已處理的連接總數(shù)
        The total number of handled connections. Generally, the parameter value is the same as acceptsunless some resource limits have been reached (for example, the worker_connections limit).
(4)requests-客戶端連接總數(shù)
        The total number of client requests.
(5)Reading-讀取請求頭的當(dāng)前連接數(shù)
        The current number of connections where nginx is reading the request header.
(6)Writing-將響應(yīng)寫回客戶端的當(dāng)前連接數(shù)
        The current number of connections where nginx is writing the response back to the client.
(7)Waiting-等待請求的當(dāng)前空閑客戶端連接數(shù)
        The current number of idle client connections waiting for a request.

參考官網(wǎng)地址:https://nginx.org/libxslt/en/docs/http/ngx_http_stub_status_module.html

到此這篇關(guān)于nginx 添加http_stub_status_module模塊的文章就介紹到這了,更多相關(guān)nginx 添加http_stub_status_module內(nèi)容請搜索本站以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持本站!

香港穩(wěn)定服務(wù)器

版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場,如有內(nèi)容涉嫌侵權(quán),請聯(lián)系alex-e#qq.com處理。

實時開通

自選配置、實時開通

免備案

全球線路精選!

全天候客戶服務(wù)

7x24全年不間斷在線

專屬顧問服務(wù)

1對1客戶咨詢顧問

在線
客服

在線客服:7*24小時在線

客服
熱線

400-630-3752
7*24小時客服服務(wù)熱線

關(guān)注
微信

關(guān)注官方微信
頂部