@echo off
title redis-server
setENV_HOME="C:\tools\nginx-1.20.0"
color 03
cd %ENV_HOME%
start nginx
chcp 65001echo"-------------nginx--------启动成功------------"
pause
2、关闭nginx脚本(stop-nginx .bat)
@echo off
tskill nginx
chcp 65001echo"-------------nginx-----关闭成功!------------"
pause
3、重启nginx脚本(restart-nginx .bat)
@echo off
title redis-server
setENV_HOME="C:\tools\nginx-1.20.0"
color 03
cd %ENV_HOME%
chcp 65001
tskill nginx
echo"-------------nginx-----关闭成功------------"
start nginx
echo"-------------nginx-----启动成功------------"
pause