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

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

主站蜘蛛池模板: 永安市| 昔阳县| 中牟县| 普宁市| 婺源县| 温泉县| 柳江县| 彩票| 铅山县| 武定县| 九江县| 西宁市| 长垣县| 梁河县| 噶尔县| 房产| 高安市| 乡城县| 嘉峪关市| 象山县| 北流市| 原平市| 南丰县| 寿宁县| 安阳县| 潜山县| 天峻县| 连南| 元朗区| 武宣县| 济阳县| 彰武县| 万全县| 疏勒县| 文山县| 师宗县| 昂仁县| 胶南市| 万全县| 老河口市| 安阳市|