Nginx restart command recently, many of my VPS often encounter 502 errors and often need to restart nginx. However, many tutorials on the Internet require tedious startup scripts, which is far less simple than apache restart commands. After studying nginx, we found that the nginx service can be managed with the-s parameter: #/usr/local/nginx/sbin/nginx-hnginx version: nginx/0.7.63Usage: nginx [-? HvVt] [-s signal] [-c filename] [-p prefix] [-g directives] Options :-?, -H: this help-v: show version and exit-V: show version and configure options then exit-t: test configuration and exit-s signal: send signal to a master process: stop, quit, reopen, reload-p prefix: set prefix path (default:/usr/local/nginx/)-c filename: set configuration file (default: conf/nginx. conf)-g directives: set global directives out of configuration file. So I executed #/usr/local/nginx/sbin/nginx-s reloadnginx and restarted successfully.