nginx 启动+停止脚本
Windows
启动方法1
使用RunHiddenConsole.exe程序运行
1.下载RunHiddenConsole.exe
RunHiddenConsole 百度网盘下载地址 密码:
5kdu
2.将RunHiddenConsole.exe 复制到nginx安装目录里(目录会更清晰)
3.安装目录下创建start.bat
@echo off
echo Starting PHP FastCGI...
C:\nginx-1.12.0\RunHiddenConsole.exe C:\php7\php-cgi.exe -b 127.0.0.1:9000-c C:\php7\php.ini
echo Starting nginx...
C:\nginx-1.12.0\RunHiddenConsole.exe C:/nginx-1.12.0/nginx.exe -p C:/nginx-1.12.0
启动方法2
直接运行安装文件中的 nginx.exe
停止
nginx安装目录下创建stop.bat
@echo off
echo Stopping nginx...
taskkill /F /IM nginx.exe > nul
echo Stopping PHP FastCGI...
taskkill /F /IM php-cgi.exe > nul
exit