当前位置: 网站运维 > nginx > 阅读正文

nginx 启动与关闭

2021.3.12.   348 次   577字

nginx 在 windows 下默认双击就可以运行, 双击后一闪而过不要紧, 默认占用80端口, 打开localhost观察是否打开

也可以使用 start nginx ,用命令行打开时, 不会一闪而过

nginx 在 windows 或 linux 下的命令是一致的, 下面是关闭命令

  • nginx -s stop : 停止nginx
  • nginx -s quit : 保存退出nginx

更多命令如下 :

Options:
  -?,-h         : this help
  -v            : show version and exit
  -V            : show version and configure options then exit
  -t            : test configuration and exit
  -T            : test configuration, dump it and exit
  -q            : suppress non-error messages during configuration testing
  -s signal     : send signal to a master process: stop, quit, reopen, reload
  -p prefix     : set prefix path (default: NONE)
  -c filename   : set configuration file (default: conf/nginx.conf)
  -g directives : set global directives out of configuration file

本篇完,还有疑问?

加入QQ交流群:11500065636 IT 技术交流群