Socket扩展是基于流行的BSD sockets,实现了和socket通讯功能的底层接口,它可以和客户端一样当做一个socket服务器。
NGINX配置:
0 1 2 3 4 5 6 7 8 |
[root@LNMP conf]# cat nginx.conf location ~ \.php { root html; try_files $uri =404; fastcgi_pass unix:/tmp/php.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } |
PHP配置:
0 1 2 3 |
[root@LNMP conf]# vim /usr/local/php/etc/php-fpm.conf ;listen = 127.0.0.1:9000 listen = /tmp/php.sock php_admin_value[open_basedir]=/home/wwwroot/site/:/tmp/ #安全选项,防跨目录 |
申明:本文由BYRD原创(基于Nginx1.7+、PHP5.X),未经许可禁止转载!
参考:http://hxl2009.blog.51cto.com/779549/875000 SourceByrd's Weblog-https://note.t4x.org/system/bsd-sockets-config/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!