win7 重启nginx、php-cgi命令:
@ECHO OFF
ECHO Starting PHP FastCGI...
set PATH=D:\wamp64\bin\php\php5.6.25;%PATH%
taskkill /fi "imagename eq php-cgi.exe"
RunHiddenConsole.exe D:\wamp64\bin\php\php5.6.25\php-cgi.exe -b 127.0.0.1:9000
RunHiddenConsole.exe D:\wamp64\bin\php\php5.6.25\php-cgi.exe -b 127.0.0.1:9001
RunHiddenConsole.exe D:\wamp64\bin\php\php5.6.25\php-cgi.exe -b 127.0.0.1:9002
RunHiddenConsole.exe D:\wamp64\bin\php\php5.6.25\php-cgi.exe -b 127.0.0.1:9003
rem RunHiddenConsole.exe D:\wamp64\bin\php\php5.6.25\php-cgi.exe -b 127.0.0.1:9004
rem RunHiddenConsole.exe D:\wamp64\bin\php\php5.6.25\php-cgi.exe -b 127.0.0.1:9005
rem 重启nginx
rem nginx -s reload
taskkill /F /fi "imagename eq nginx.exe"
start nginx
rem PAUSE
相关资料参考:
- taskkill https://technet.microsoft.com/en-us/library/bb491009.aspx
- nginx fow win http://nginx.org/en/docs/windows.html
- php for win http://windows.php.net/download/
本文提供了一种在Windows 7环境下重启Nginx和PHP-CGI的方法,通过使用特定命令实现服务的停止与启动,确保Web服务的正常运行。涉及的关键步骤包括终止旧进程和服务重启。
467

被折叠的 条评论
为什么被折叠?



