Apache tiene una gracefulopción que puede buscar modificaciones http.confsin reiniciar Apache. ¿Qué hay de nginx?
74
nginx admite las siguientes señales:
TERM, INT - Quick shutdown
QUIT - Graceful shutdown
HUP - Configuration reload: Start the new worker processes with a new configuration, Gracefully shutdown the old worker processes
USR1 - Reopen the log files
USR2 - Upgrade Executable on the fly
WINCH - Gracefully shutdown the worker processes
HUP es lo que estás buscando, así que sudo kill -HUP pid (nginx pid)
Use nginx -s reload
Por lo general, el script de inicio de nginx tiene
reloadacción, es decir:/etc/init.d/nginx reload/usr/local/etc/rc.d/nginx reloadfuente
service nginx reload?PD: no funciona en Windows.
fuente
Hace un tiempo escribí sobre cómo reiniciar nginx con cero tiempo de inactividad. Esto puede ser útil para usted.
http://tumblelog.jauderho.com/post/101514948/restart-nginx-with-zero-downtime
fuente
USR2es para actualizar el ejecutable, no para la simple recarga de configuración.