通过xxfpm

-n, –number number of processes to keep
-i, –ip ip address to bind
-p, –port port to bind, default is 8000
-u, –user start processes using specified linux user
-g, –group start processes using specified linux group
-r, –root change root direcotry for the processes
-h, –help output usage information and exit
-v, –version output version information and exit

使用例子:
xxfpm z:/php5/php-cgi.exe -n 5 -p 8080

给程序加启动参数 路径要用”/”而不用”\”。例如要指定php.ini的路径,可以用下面例子:
xxfpm "z:/php5/php-cgi.exe -c z:/php5/php.ini" -n 5 -i 127.0.0.1 -p 9000

  • php-cgi.exe命令
    php-cgi.exe -b 127.0.0.1:9000 -c php.ini

nssm参数

xxfpm "E:/phpstudy_pro/Extensions/php/php7.3.4nts/php-cgi.exe -c E:/phpstudy_pro/Extensions/php/php7.3.4nts/php.ini" -n 5 -i 127.0.0.1 -p 9000

参考:https://www.jianshu.com/p/1f2d4b1ca10d