php-fpm使用sock方式配置
我们大部分默认的nginx连接方式为php-cgi监听127.0.0.1:9000的方式,刚刚测试了使用socket方式连接,速度飞快啊!
nginx配置方法:
location ~ \.php$ {
fastcgi_pass unix:/dev/shm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /opt/www_data/code/public_html$fastcgi_script_name;
include fastcgi_params;
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。