[?] Joy, Works and Thoughts Rotating Header Image

Reload Konfigurasi Nginx

File konfigurasi nginx di web server anda dapat di *reload* dengan mengunakan signal dan tanpa melakukan restart;

ps aux | egrep '(PID|nginx)'

Perintah tersebut akan menghasilkan output seperti;


USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root     22757  0.0  0.7  42028  2604 ?        Ss   04:02   0:00 nginx: master process /usr/local/sbin/nginx
nobody   23303  0.0  0.7  42028  2336 ?        S    05:25   0:00 nginx: worker process
nobody   23304  0.0  0.7  42028  2368 ?        S    05:25   0:00 nginx: worker process
nobody   23305  0.0  0.7  42028  2368 ?        S    05:25   0:00 nginx: worker process
nobody   23306  0.0  0.7  42028  2348 ?        S    05:25   0:00 nginx: worker process
nobody   23307  0.0  0.7  42028  2376 ?        S    05:25   0:00 nginx: worker process
nobody   23308  0.0  0.8  42028  2876 ?        S    05:25   0:00 nginx: worker process
nobody   23309  0.0  0.7  42028  2360 ?        S    05:25   0:00 nginx: worker process
nobody   23310  0.0  0.6  42028  2192 ?        S    05:25   0:00 nginx: worker process
nobody   23311  0.0  0.7  42028  2328 ?        S    05:25   0:00 nginx: worker process
nobody   23312  0.0  0.8  42028  2928 ?        S    05:25   0:00 nginx: worker process

Reload konfigurasi dapat dilakukan melalui perintah kill -HUP PID master proses nginx; dalam kasus ini adalah;

kill -HUP 22757

Selamat Mencoba ..

2 Comments

  1. Pradhana says:

    Atau mungkin bisa lebih singkat dengan command ini, bisa dicobakan?

    kill -1 no_pid

  2. webwoke says:

    Bagaimana kalau pakai :
    pkill -9 nginx

    webwoke’s last blog post..Position at 2008-12-09 19:15:07

Leave a Reply

CommentLuv Enabled