kakakakakku blog

Weekly Tech Blog: Keep on Learning!

Mac に導入した nginx を起動/停止/再起動する

こんな感じで!

# 起動
$ sudo nginx
# 停止
$ sudo nginx -s stop
# 再起動
$ sudo nginx -s reload

プロセスを確認するならこんな感じで!

$ ps -ef | grep nginx | grep -v grep
    0  1634     1   0  6:32PM ??         0:00.00 nginx: master process nginx
   -2  1635  1634   0  6:32PM ??         0:00.07 nginx: worker process
   -2  1636  1634   0  6:32PM ??         0:00.00 nginx: worker process

ちなみに php-fpm を起動するならこれで!

$ sudo php-fpm

【追記】nginx を詳しく学ぶなら「nginx 実践入門」を読むと良いかと!

nginx実践入門 (WEB+DB PRESS plus)

nginx実践入門 (WEB+DB PRESS plus)