Nginx常用命令解析
命令 | 作用 |
./nginx | 启动 |
./nginx -s stop | 停止(不推荐),直接停止 |
./nginx -s quit | 退出(推荐), 不再接收新的请求, 处理完当前请求后停止 |
./nginx -t | 检查配置文件是否正确 |
./nginx -v/V | 查看版本/详情 |
./nginx -?/h | 查看帮助 |
./nginx -c /usr/local/nginx/conf/nginx.conf | 启动并指定配置文件 |
./nginx -s reload | 重启 |