国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > Nginx > 正文

Nginx配置檢測服務狀態的實現方法

2024-08-30 12:24:25
字體:
來源:轉載
供稿:網友

1. 查看是否安裝檢查狀態模塊;

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

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

Ø  檢查狀態模塊;--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.confserver {  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; ##可對該頁面的訪問者進行過濾   #deny all;   }  }[root@localhost ~]# nginx -tnginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is oknginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful[root@localhost ~]# nginx -s reload

4.測試語法;

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

5.     輸出內容詳解;

第一行  Active connections: 1  ——活躍的連接數量,包括等待客戶端數0
第二行 server accepts handled requests —— 總共處理了1個連接 , 成功創建1次握手, 總共處理了1個請求
第三行 Reading — 讀取客戶端的連接數,Writing — 響應數據到客戶端的數量,Waiting — 開啟 keep-alive 的情況下,這個值等于 active – (reading+writing), 意思就是 Nginx 已經處理完正在等候下一次請求指令的駐留連接.

以上就是本文的全部內容,希望對大家的學習有所幫助,也希望大家多多支持錯新站長站。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 苏尼特左旗| 青龙| 定远县| 高唐县| 盘锦市| 临漳县| 海城市| 康马县| 尼木县| 运城市| 抚顺市| 延川县| 尼勒克县| 玉屏| 华阴市| 和林格尔县| 惠东县| 邹城市| 泌阳县| 邵阳县| 射阳县| 贡觉县| 弋阳县| 三亚市| 昌江| 泗洪县| 即墨市| 冕宁县| 镇宁| 商丘市| 桂东县| 克东县| 南昌市| 二连浩特市| 巨鹿县| 平塘县| 新乐市| 永吉县| 务川| 丘北县| 灌阳县|