- 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:

推薦閱讀
- ClickHouse性能之巔:從架構設計解讀性能之謎
- Mastering Adobe Captivate 2017(Fourth Edition)
- 深入淺出Spring Boot 2.x
- Servlet/JSP深入詳解
- Rust Essentials(Second Edition)
- 學習正則表達式
- 軟件品質之完美管理:實戰經典
- Learning Hadoop 2
- SQL Server 2008 R2數據庫技術及應用(第3版)
- Everyday Data Structures
- Laravel Application Development Blueprints
- C編程技巧:117個問題解決方案示例
- 零基礎學SQL(升級版)
- Web開發新體驗
- Enterprise Application Architecture with .NET Core