亚洲国产精品人久久,亚洲va国产日韩欧美精品色婷婷,久久久久88色偷偷,免费人成黄页在线观看国际

17站長(zhǎng)網(wǎng)

Nginx配置檢測(cè)服務(wù)狀態(tài)的實(shí)現(xiàn)方法

2022-10-6 09:31| 查看: 1464 |來(lái)源: 互聯(lián)網(wǎng)

1.查看是否安裝檢查狀態(tài)模塊;[root@localhost ~]# nginx -V nginx version: nginx/1.12.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) configure arguments: --prefix=/usr/local/nginx --with-http_

1.查看是否安裝檢查狀態(tài)模塊;

[root@localhost ~]# nginx -V nginx version: nginx/1.12.2 built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) configure arguments: --prefix=/usr/local/nginx --with-http_sub_module

2.如未安裝,重新編譯安裝;

  檢查狀態(tài)模塊;--with-http_stub_status_module

[root@localhost ~]# cd /usr/local/src/nginx-1.12.2/ [root@localhost ~]# ./configure --prefix=/usr/local/nginx --with-http_stub_status_module [root@localhost ~]# make && make install

3.編輯nginx 的配置文件;

[root@localhost ~]# vim /usr/local/nginx/conf/nginx.conf server { listen 80; server_name localhost; #access_log logs/host.access.log main; location /nginx_status { stub_status on; access_log off; #allow 127.0.0.1; ##可對(duì)該頁(yè)面的訪問(wèn)者進(jìn)行過(guò)濾 #deny all; } } [root@localhost ~]# nginx -t nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful [root@localhost ~]# nginx -s reload

4.測(cè)試語(yǔ)法;

[root@localhost ~]# curl http://192.168.10.110:80/nginx_status Active connections: 1 server accepts handled requests 1 1 1 Reading: 0 Writing: 1 Waiting: 0

5.輸出內(nèi)容詳解;

第一行  Active connections: 1  ——活躍的連接數(shù)量,包括等待客戶端數(shù)0

第二行 server accepts handled requests —— 總共處理了1個(gè)連接 , 成功創(chuàng)建1次握手, 總共處理了1個(gè)請(qǐng)求

第三行 Reading — 讀取客戶端的連接數(shù),Writing — 響應(yīng)數(shù)據(jù)到客戶端的數(shù)量,Waiting — 開啟 keep-alive 的情況下,這個(gè)值等于 active – (reading+writing), 意思就是 Nginx 已經(jīng)處理完正在等候下一次請(qǐng)求指令的駐留連接

本文最后更新于 2022-10-6 09:31,某些文章具有時(shí)效性,若有錯(cuò)誤或已失效,請(qǐng)?jiān)诰W(wǎng)站留言或聯(lián)系站長(zhǎng):17tui@17tui.com
·END·
站長(zhǎng)網(wǎng)微信號(hào):w17tui,關(guān)注站長(zhǎng)、創(chuàng)業(yè)、關(guān)注互聯(lián)網(wǎng)人 - 互聯(lián)網(wǎng)創(chuàng)業(yè)者營(yíng)銷服務(wù)中心

免責(zé)聲明:本站部分文章和圖片均來(lái)自用戶投稿和網(wǎng)絡(luò)收集,旨在傳播知識(shí),文章和圖片版權(quán)歸原作者及原出處所有,僅供學(xué)習(xí)與參考,請(qǐng)勿用于商業(yè)用途,如果損害了您的權(quán)利,請(qǐng)聯(lián)系我們及時(shí)修正或刪除。謝謝!

17站長(zhǎng)網(wǎng)微信二維碼

始終以前瞻性的眼光聚焦站長(zhǎng)、創(chuàng)業(yè)、互聯(lián)網(wǎng)等領(lǐng)域,為您提供最新最全的互聯(lián)網(wǎng)資訊,幫助站長(zhǎng)轉(zhuǎn)型升級(jí),為互聯(lián)網(wǎng)創(chuàng)業(yè)者提供更加優(yōu)質(zhì)的創(chuàng)業(yè)信息和品牌營(yíng)銷服務(wù),與站長(zhǎng)一起進(jìn)步!讓互聯(lián)網(wǎng)創(chuàng)業(yè)者不再孤獨(dú)!

掃一掃,關(guān)注站長(zhǎng)網(wǎng)微信

大家都在看

熱門排行

    最近更新

      返回頂部