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

推薦閱讀
- Puppet 4 Essentials(Second Edition)
- Android Wearable Programming
- Raspberry Pi for Python Programmers Cookbook(Second Edition)
- Bootstrap Site Blueprints Volume II
- C語言程序設計習題解析與上機指導(第4版)
- SQL Server 2016從入門到精通(視頻教學超值版)
- INSTANT Sencha Touch
- jQuery開發基礎教程
- 飛槳PaddlePaddle深度學習實戰
- 用案例學Java Web整合開發
- Red Hat Enterprise Linux Troubleshooting Guide
- Learning Nessus for Penetration Testing
- Mastering Gephi Network Visualization
- Practical GIS
- Java 7 Concurrency Cookbook