Quiero detener Nginx pero falla así.
$ sudo service nginx stop
Stopping nginx: [FAILED]
Y nginx.confeso define el lugar de nginx.pid tiene una línea.
# /etc/nginx/nginx.conf
pid /var/run/nginx.pid;
Pero no hay nginx.piden el directorio /var/run/.
locate nginx.pid muestra esta salida
/var/run/nginx.pid
/var/run/nginx.pid.oldbin
Pero después updatedbno hay coincidencia para la búsqueda. Estoy usando nginx / 1.4.4 in CentOS release 6.5 (Final).
¿Qué debo hacer para detener el demonio nginx?
Editar 2014/01/07
Esta es la salida de ps -ef | grep nginx, parece que nginx daemon todavía se está ejecutando.
ironsand 17065 16933 0 15:55 pts/0 00:00:00 grep --color nginx
root 19506 1 0 2013 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
ironsand 19507 19506 0 2013 ? 00:00:25 nginx: worker process
Y sudo service nginx restartda este error. Creo que nginxno puede comenzar porque el viejo todavía está vivo. Y /var/log/nginx/error.log-2014017contiene también este error.
Stopping nginx: [FAILED]
Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
[FAILED]
pscomando.
ps -ef | grep nginxosudo netstat -tlnp | grep nginx.