Nginxステータス監視設定手順

Nginxステータス監視設定手順

 

①stub_statusディレクティブの確認(「--with-http_stub_status_module」が表示されれば設定可能)

nginx -V

※設定されていない場合は

http://blog.trippyboy.com/2013/nginx/nginx-httpstubstatusmodule-unknown-directive-stub_status-%E3%82%92%E8%A7%A3%E6%B6%88%E3%81%99%E3%82%8B%E3%81%AE%E5%B7%BB/

 

②/etc/nginx/sites-available/default編集

location/nginx_status{
        stub_status on;
        access_log off;
        allow 127.0.0.1;
        deny all;
}

 

③設定ファイル読み込み

service nginx reload

 

④確認

GET http://localhost/nginx_status

 

タグ:

Nginx
最終更新:2013年12月26日 11:08