下载Nginx
启动脚本
新建 nginx-start.bat 文件,内容如下(使用自己的nginx文件夹路径):
@echo off
e:
cd C:/soft/nginx-1.22.0
echo "nginx is starting on port 80"
start "" "nginx.exe"
exit
关闭脚本
新建 nginx-stop.bat 文件,内容如下(使用自己的nginx文件夹路径):
@echo off
e:
cd C:/soft/nginx-1.22.0
tasklist | findstr /i "nginx.exe"
echo "nginx is running, stopping..."
rem nginx -s stop
TASKKILL /F /IM nginx.exe /T
echo "stop ok"