Nginx common commands Daquan

Common commands of Nginx under Windows:

Start: directly click nginx.exe  or cmd
in the Nginx directory to run start nginx

Close
nginx -s stop  or  nginx -s quit

stop means to stop nginx immediately without saving relevant information

quit means to exit nginx normally and save relevant information

nginx -s stop  or  nginx -s quit

nginx -s reload  : reload after modifying the configuration to take effect

nginx -s reopen  : reopen the log file

nginx -t -c  /path/to/nginx.conf Test whether the nginx configuration file is correct


nginx -s reopen  #Restart Nginx

nginx -s reload  #Reload the Nginx configuration file, and restart Nginx in an elegant way

nginx -s stop  #force stop Nginx service

nginx -s quit  #Stop the Nginx service gracefully (that is, stop the service after all requests are processed)

nginx -t  #Check whether there is a syntax error in the configuration file, and then exit

nginx -?,-h  #Open help information

nginx -v  #Display version information and exit

nginx -V  #Display version and configuration option information, then exit

nginx -t  #Check whether there is a syntax error in the configuration file, and then exit

nginx -T  #Detect whether there is a syntax error in the configuration file, dump and exit

nginx -q  #Shield non-error information during detection of configuration files

nginx -p prefix  #Set prefix path (default: /usr/share/nginx/)

nginx -c filename  #Set configuration file (default: /etc/nginx/nginx.conf)

nginx -g directives  #Set global directives outside the configuration file

killall nginx  #kill all nginx processes

Guess you like

Origin blog.csdn.net/qq_59747594/article/details/125275505