Apache a une option graceful
qui peut rechercher des modifications dans http.conf
sans redémarrer Apache. Et Nginx?
nginx prend en charge les signaux suivants:
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 est ce que vous recherchez, donc Sudo kill -HUP pid (nginx pid)
Utilisez nginx -s reload
En général, le script init de nginx a une action reload
, c'est-à-dire:
/etc/init.d/nginx reload
/usr/local/etc/rc.d/nginx reload
service nginx reload
?
P.S. Ne fonctionne pas sous Windows.