凤眠

先行后知,知行合一

导航

nginx/Windows-1.9.3启动脚本

Posted on 2015-08-06 09:42  凤眠  阅读(722)  评论(0编辑  收藏  举报

启动nginx.bat

@echo off
D:
cd D:\Program Files\nginx-1.9.3 
tasklist | findstr /i "nginx.exe"
echo "nginx is starting on port 80"
start "" "nginx.exe"
pause

重启nginx.bat

@echo off
D:
cd D:\Program Files\nginx-1.9.3 
tasklist | findstr /i "nginx.exe"
nginx -s reload
echo "restart ok"
pause

停止nginx.bat

@echo off
D:
cd D:\Program Files\nginx-1.9.3 
tasklist | findstr /i "nginx.exe"
echo "nginx is running, stopping..."
rem nginx -s stop
TASKKILL /F /IM nginx.exe /T
echo "stop ok"
pause