linux - How to stop nginx? It keep killing one process and opening a new one with a different pid -


i have nginx installed via ubuntu package manager. try , run sudo nginx ,

nginx: [emerg] bind() [::]:80 failed (98: address in use) 

ok fine. run

sudo netstat -plant | grep 8 tcp     0    0 0.0.0.0:80    0.0.0.0:*     listen    3593/nginx -g daemo tcp6    0    0 :::80         :::*          listen    3594/nginx -g daemo 

so seems nginx still running.

sudo nginx -s stop 

i try , stop it, , re-check.

sudo netstat -plant | grep 8  tcp     0    0 0.0.0.0:80    0.0.0.0:*     listen    3736/nginx -g daemo tcp6    0    0 :::80         :::*          listen    3736/nginx -g daemo 

so changed pid number. every time instead of killing it. guess kills process , opens new one.

how can stop it?

i had use service daemon. service nginx stop instead of nginx -s stop.

apparently service daemon 1 controls nginx, , calling when use -s flag. needed access directly in case


Comments