cmd kill nginx background process command kill nginx background nginx common command

win+r Enter cmd to open the dos window and enter:

taskkill /f /t /im nginx.exe

nginx common commands

start nginx   #启动Nginx

taskkill /IM nginx.exe /F #杀死进程(尤其是修改nginx.conf文件后,加载不了修改之后的配置文件)

killall nginx #杀死所有nginx进程

nginx -s reopen #重启Nginx

nginx -s reload #重新加载Nginx配置文件,然后以优雅的方式重启Nginx

nginx -s stop #强制停止Nginx服务

nginx -s quit #优雅地停止Nginx服务(即处理完所有请求后再停止服务)

nginx -t #检测配置文件是否有语法错误,然后退出

nginx -?,-h #打开帮助信息

nginx -v #显示版本信息并退出

nginx -V #显示版本和配置选项信息,然后退出

nginx -t #检测配置文件是否有语法错误,然后退出

nginx -T #检测配置文件是否有语法错误,转储并退出

nginx -q #在检测配置文件期间屏蔽非错误信息

nginx -p prefix #设置前缀路径(默认是:/usr/share/nginx/)

nginx -c filename #设置配置文件(默认是:/etc/nginx/nginx.conf)

nginx -g directives #设置配置文件外的全局指令


Guess you like

Origin blog.csdn.net/qq_46123200/article/details/130964553