537
530

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Nginx コマンド超シンプル早見表

Last updated at Posted at 2014-11-27

自分 (Katz) が手っ取り早く nginx のコマンドを使うためだけにまとめて公開している記事となります。 CentOS 7, Amazon Linux 2 & 2023 で動作確認してます。

起動

nginx

停止

CentOS 6 & Amazon Linux

nginx -s stop

CentOS 7 & Amazon Linux 2

systemctl stop nginx
service nginx stop

再起動

CentOS 6 & Amazon Linux

/etc/init.d/nginx restart

CentOS 7 & Amazon Linux 2

systemctl restart nginx
service nginx restart

スタートアップ登録

CentOS 7 & Amazon Linux 2

systemctl enable nginx #登録
systemctl disable nginx #解除

設定の再読み込み

CentOS6 & Amazon Linux

nginx reload
service nginx reload

CentOS7 & Amazon Linux 2

systemctl reload nginx
service nginx reload

設定ファイルのチェック

nginx -t

設定ファイルの場所

メインの設定ファイル

cd /etc/nginx/

各 Vhosts 用設定ファイル

cd /etc/nginx/conf.d/

以上

537
530
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
537
530

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?