解决为:
sudo kill -HUP pid (nginx pid)
The proper way to restart Nginx after
a configuration change is to use the
built in signals. As noted on the
Nginx Wiki, the following signals are
presently supported:
* 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
https://boxpanel.blueboxgrp.com/public/thevault/index.php/RestartingNginxAfterConfiguration_Changes
更新
较新版本的nginx还可以这样:
path_to_nginx/nginx reload
或者
path_to_nginx/nginx -s reload