首页 > 代码库 > tengine配置php(enginx php-fpm)
tengine配置php(enginx php-fpm)
/usr/local/tengine/conf/
https://segmentfault.com/q/1010000002410790
/usr/local/php/etc/php-fpm.conf文件中:
listen = /var/run/fastcgi.sock
listen = 127.0.0.1:9000
/usr/local/tengine/conf/conf.d/www.conf文件中:
fastcgi_pass unix:/var/run/fastcgi.sock;
fastcgi_pass 127.0.0.1:9000;
listen = 127.0.0.1:9000 对应配置: fastcgi_pass 127.0.0.1:9000;
listen = /var/run/fastcgi.sock 对应配置:fastcgi_pass unix:/var/run/fastcgi.sock;
本人发现:unix:/var/run/fastcgi.sock方式启动php-fpm时,
1、php7中无法成功加载redis模块
2、phpinfo()中Loaded Configuration File 为none
php-fpm启动时指定php.ini路径(适用于nginx访问)
[root@ebs-34032 Common]# /usr/local/php/sbin/php-fpm -y /usr/local/php/etc/php-fpm.conf -c /etc/php/php.ini
php-fpm 启动:
/usr/local/php/sbin/php-fpm
php-fpm 关闭:
kill -INT `cat /var/run/php-fpm.pid`
php-fpm 重启:
kill -USR2 `cat /var/run/php-fpm.pid`
netstat -anp|grep 9000
ps -aux||grep php-fpm
tengine配置php(enginx php-fpm)