极简工具箱

免费在线工具 · 本地计算 · 无需上传

Nginx 命令

Nginx 服务管理命令速查,含配置测试、平滑重载与 systemd 操作。

广告位(百度联盟)
命令说明示例
nginx启动 Nginxsudo nginx
nginx -t测试配置文件语法sudo nginx -t
nginx -T测试并打印完整配置nginx -T
nginx -s reload平滑重载配置sudo nginx -s reload
nginx -s stop快速停止sudo nginx -s stop
nginx -s quit优雅退出(处理完请求)sudo nginx -s quit
nginx -s reopen重新打开日志文件sudo nginx -s reopen
nginx -c指定配置文件启动nginx -c /etc/nginx/nginx.conf
nginx -v查看版本nginx -v
nginx -V查看编译参数nginx -V 2>&1 | grep -i "http_ssl"
systemctl start nginxsystemd 启动sudo systemctl start nginx
systemctl restart nginxsystemd 重启sudo systemctl restart nginx
systemctl status nginx查看运行状态systemctl status nginx
systemctl enable nginx设置开机自启sudo systemctl enable nginx

更多速查表

常用在线工具