fastcgi重启

重启nginx和php-cgi 的命令

nginx: sudo /etc/init.d/nginx restart 同样也可以有start,stop等参数
php-cgi: 先杀死进程
sudo killall -HUP php5-cgi
再启动
sudo /usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -C 5 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid

参数含义如下

* -f 指定调用FastCGI的进程的执行程序位置,根据系统上所装的PHP的情况具体设置 
* -a 绑定到地址addr 
* -p 绑定到端口port 
* -s 绑定到unix socket的路径path 
* -C 指定产生的FastCGI的进程数,默认为5(仅用于PHP) 
* -P 指定产生的进程的PID文件路径 
* -u和-g FastCGI使用什么身份(-u 用户 -g 用户组)运行,Ubuntu下可以使用www-data,其他的根据情况配置,如nobody、apache等

==========================

今天在nginx+php上安装xhprof的扩展,在phpinfo()中总是不显示。

最终才发现原因,是一直只是重启nginx,而没有重启fastcgi

posted @ 2013-11-04 16:12  siyed  Views(2925)  Comments(0Edit  收藏  举报