ok-engineering.net
  • タグ: Nginxのconf

    検索結果: 1件

    article-thumbnail

    Nginxのヘルスチェックで1×1ピクセルのgif画像を出力する方法

    【概要】Nginxのヘルスチェックで1×1ピクセルのgif画像を出力する方法についてまとめます。とても軽量な為、Nginxで動かしているWebサーバーのヘルスチェックにお勧めです。【詳細】[概要]「/etc/nginx/conf.d/ドメイン名.conf」のconfigファイルに設定することを想定します。そのconfigファイルのlocation句として「/health-check.html」を追加します。その内部に「empty_gif;」と最後に「break;」を追記すれば完了です。これで「http://ドメイン名/health-check.html」にアクセスすれば1×1ピクセルのgif画像が出力されます。[設定手順]・編集コマンドvi /etc/nginx/conf.d/ドメイン名.conf・追記内容location /health-check.html {empty_gif;access_log off;break;}

    カテゴリ: NGINX 2020-10-04 01:04:59
    カテゴリ一覧
    1. CentOS23posts
    2. mac15posts
    3. MySQL12posts
    4. Nuxt.js11posts
    5. JS11posts
    6. Linux10posts
    7. Node.js8posts
    8. NGINX7posts
    9. Git5posts
    10. PHP4posts
    11. Redis3posts
    12. GCP2posts
    13. AWS2posts
    14. jQuery2posts
    15. CSS1posts
    16. Windows1posts
    17. CakePHP1posts
    18. Docker1posts
    19. ZABBIX1posts
    © 2020 Copyright: ok-engineering.net