Windows下Nginx及PHP后台启动脚本
start_nginx.bat
@echo off
set nginx_home=D:/Server/Nginx/nginx-1.13.8
REM Windows 下无效
REM set PHP_FCGI_CHILDREN=10
echo Starting Nginx...
RunHiddenConsole %nginx_home%/nginx.exe -p %nginx_home%
pause()
start_server.bat
@echo off
set php_home=D:/Server/PHP/php-7.2.0-nts-Win32-VC15-x64
set nginx_home=D:/Server/Nginx/nginx-1.13.8
REM Windows 下无效
REM set PHP_FCGI_CHILDREN=10
REM 每个进程处理的最大请求数,或设置为 Windows 环境变量
set PHP_FCGI_MAX_REQUESTS=1024
echo Starting PHP FastCGI...
RunHiddenConsole %php_home%/php-cgi.exe -b 127.0.0.1:9000 -c %php_home%/php.ini
echo Starting Nginx...
RunHiddenConsole %nginx_home%/nginx.exe -p %nginx_home%
pause()
stop_server.bat
@echo off
echo Stopping nginx...
taskkill /F /IM nginx.exe > nul
echo Stopping PHP FastCGI...
taskkill /F /IM php-cgi.exe > nul
exit
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/24/nginx-and-php-backend-startup-scripts-under-windows/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
Windows下Nginx及PHP后台启动脚本
start_nginx.bat
@echo off
set nginx_home=D:/Server/Nginx/nginx-1.13.8
REM Windows 下无效
REM set PHP_FCGI_CHILDREN=10
echo Starting Nginx...
RunHi……
文章目录
关闭
共有 0 条评论