nginx 啟動(dòng)+停止腳本
Windows
啟動(dòng)方法1
使用RunHiddenConsole.exe程序運(yùn)行
1.下載RunHiddenConsole.exe
RunHiddenConsole 百度網(wǎng)盤下載地址 密碼:
5kdu
2.將RunHiddenConsole.exe 復(fù)制到nginx安裝目錄里(目錄會(huì)更清晰)
3.安裝目錄下創(chuàng)建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
啟動(dòng)方法2
直接運(yùn)行安裝文件中的 nginx.exe
停止
nginx安裝目錄下創(chuàng)建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