官术网_书友最值得收藏!

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:

主站蜘蛛池模板: 罗源县| 博罗县| 苏州市| 剑阁县| 南召县| 云和县| 台东县| 团风县| 乐山市| 万全县| 仁化县| 石狮市| 油尖旺区| 亚东县| 博客| 蓬溪县| 维西| 金湖县| 内乡县| 蕉岭县| 从江县| 宜兰县| 社会| 福鼎市| 贺州市| 南宁市| 迭部县| 同德县| 隆昌县| 尖扎县| 中卫市| 亚东县| 瑞金市| 灯塔市| 承德县| 德江县| 肇庆市| 武义县| 建平县| 罗平县| 漳州市|