最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php-fpm设置socket方式连接FastCGI
时间:2022-06-24 16:56:50 编辑:袖梨 来源:一聚教程网
socket方式不会走到tcp层,tcp方式则会走到ip层。因此,理论上说socket连接方式效率会更好一点。
TCP和unix domain socket方式对比
TCP是使用TCP端口连接127.0.0.1:9000
Socket是使用unix domain socket连接套接字/dev/shm/php-fpm.sock
修改php-fpm.conf配置
#listen = 127.0.0.1:9000 listen=/dev/shm/php-fpm.sock #/dev/shm/为内存文件系统,注意 确保可读写 listen.owner=apache #注意自己的用户和组 listen.group=apache
修改nginx.conf配置
#fastcgi_pass 127.0.0.1:9000; #将相应的如上内容修改如下 fastcgi_pass unix:/dev/shm/php-fpm.sock;
重启nginx和php-fpm
service nginx restart /usr/local/nginx/sbin/nginx -s reload
相关文章
- 卡牌木剑游戏体验如何_卡牌木剑规则玩法介绍 05-28
- 光遇5月28日每日任务详细攻略指南 05-28
- 数据权限为何需要置于Mapper XML中:DataScope拦截器的架构权衡 05-28
- 归零巡礼:亡谍镇魂曲心因性发展偏离成就获取指南解析 05-28
- 《三国志战略版》5月10日版本更新公告 05-28
- 星语相机app如何修复老照片 05-28