- NGINX Cookbook
- Tim Butler
- 120字
- 2021-07-03 00:04:21
How to do it...
We can enable the basic NGINX stub_status page to give some rudimentary statistics and service status. To enable, edit your site config and add the following:
location = /nginx_status { stub_status on; access_log off; allow <YOURIPADDRESS>; deny all; }
To prevent information leakage about your system, we have added the allow command. This should be your IP address. This is followed by the deny all command to prevent anyone else from loading the URL. We've also turned off access logs for this URL to save space.
After reloading your configuration (hint: systemctl reload nginx for systemd-based OS), you can now load the new URL /nginx_status in your browser.
You should see something like the following:

推薦閱讀
- C++程序設計(第3版)
- Building a Game with Unity and Blender
- Learning Docker
- 程序員數學:用Python學透線性代數和微積分
- Learning RabbitMQ
- Vue.js 3.0源碼解析(微課視頻版)
- Python零基礎快樂學習之旅(K12實戰訓練)
- KnockoutJS Starter
- 用戶體驗增長:數字化·智能化·綠色化
- 批調度與網絡問題的組合算法
- Python High Performance Programming
- Unity 2018 Shaders and Effects Cookbook
- Django 3.0入門與實踐
- Python數據預處理技術與實踐
- Kotlin程序員面試算法寶典