tengine配置php(enginx php-fpm)
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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访问)
[[email protected] 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)的主要内容,如果未能解决你的问题,请参考以下文章