ps -ef | grep nginx
Graceful restart command:
kill -HUP enter the name or process number file path
or use
/usr/nginx/sbin/nginx -s reload
Note that after modifying the configuration file, it is best to check whether the modified configuration file is correct, so as to avoid Nginx errors after restarting and affecting the stable operation of the server.
The command to judge whether the Nginx configuration is correct is as follows:
nginx -t -c /usr/nginx/conf/nginx.conf
or
/usr/nginx/sbin/nginx -t
nginx reload restart
implement
# /usr/local/nginx/sbin/nginx -s reload
nginx has been restarted successfully
Centos nginx restart
Restart Nginx
service nginx restart
/etc/init.d/nginx stop
/etc/init.d/nginx start
Ubuntu Nginx
$sudo service nginx start
$sudo service nginx stop
Win7
start
Unzip to c:\nginx, run nginx.exe (ie nginx -c conf\nginx.conf), default port 80, see the log in folder C:\nginx\logs
Common configuration
C:\nginx\conf\nginx.conf, use your own defined conf file such as my.conf, the command is nginx -c conf\my.conf