unix:/tmp/php-cgi.sock
为什么要用unix:/tmp/php-cgi.sock,最主要的特征就是unix socket比tcp快,当网站流量大的时候,服务器的优化是分毫必争的.
当我们用php-fpm来管理我们的php启动时,按照如下的配置,就会自动生成/tmp/php-cgi.sock。在php-fpm.conf文件中设置
[www]
listen = /tmp/php-cgi.sock
修改nginx.conf为:
# fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/tmp/php-cgi.sock;
重启php-fpm和ngix
unix:/tmp/php-cgi.sock的更多相关文章
- 关于nginx配置的一个报错connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory)
针对配置php的情况: linux服务器一般提示这个 connect() to unix:/tmp/php-cgi.sock failed (2: No such file or directory) ...
- 转connect() to unix:/var/run/php-fpm.sock failed (11: Resource temporarily unavailable)
网站常出现502 bad gateway,程序没有问题. 根据nginx日志:connect() to unix:/var/run/php-fpm.sock failed (11: Resource ...
- 输入docker ps 报错信息处理Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: permission denied.
完整错误信息 Get http:///var/run/docker.sock/v1.19/containers/json: dial unix /var/run/docker.sock: permis ...
- 关于使用deepin在linux下安装mysql出现Can't connect to local MySQL server through socket '/tmp/mysql/mysql.sock' (2)的解决方法
根据目录/etc/mysql打开文件debain.cnf 此时文本里的内容为 # Automatically generated for Debian scripts. DO NOT TOUCH![c ...
- 【转载】Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 解决办法
Docker Docker 安装后 报 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docke ...
- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql/mysql.sock' (2)
[root@XXX ~]# mysql -h localhost -uroot -p Enter password: ERROR (HY000): Can't connect to local MyS ...
- Cannot connect to the Docker daemon at unix:///var/run/docker.sock.问题解决
出现Cannot connect to the Docker daemon at unix:///var/run/docker.sock时,先用tail -5f /var/log/upstart/do ...
- Docker未启动错误:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
此问题是因为Docker安装后未启动所致,执行以下命令启动docker: systemctl start docker.service 具体日志如下: Connecting to ... Connec ...
- supervisorctl unix:///var/run/supervisor.sock refused connection
运行supervisorct 报如下错误 supervisorctl unix:///var/run/supervisor.sock refused connection 查看supervisord. ...
随机推荐
- java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.JPEGCodec
今天迁移老项目到linux服务器,jdk8 ,tomcat8.5遇到这个问题. java.lang.ClassNotFoundException: com.sun.image.codec.jpeg.J ...
- 设置DatagridView的列头样式
设置DataGridView.ColumnHeaderDefaultCellStyle的BackColor属性会发现没有效果.这是因为在启动了可视样式的时候,BackColor和ForeColor的值 ...
- redis的window客户端下载地址
这里是window的版本,由微软维护的: https://github.com/MicrosoftArchive/redis/releases
- kafka_zookeeper_配置文件配置
server.properties配置如下: broker.id=0 num.network.threads=2 num.io.threads=8 socket.send.buffer.bytes=1 ...
- 记录github 免登陆用户名密码方式
1.https 代码模式切换为ssh模式: (本博客有文章介绍) 2.~/.ssh/github_rsa.pub 内容添加到github “config“ 目录下面 3.配置~/.ssh/config ...
- 关于Cocos2d-x手机上运行游戏的时候屏幕横屏改竖屏的解决方案
cocos2d-x打包的时候默认是横屏,如果要改成竖屏,步骤如下: 1.打开项目 2.打开proj.android 3.编辑AndroidManifest.xml 4. 找到这一句android:sc ...
- Spring 4 官方文档学习(十)数据访问之JDBC
说明:未修订版,阅读起来极度困难 1.Spring框架JDBC的介绍 Spring JDBC - who does what? 动作 Spring 你 定义连接参数 是 打开连接 是 指定SQ ...
- linux -- ubuntu搭建nodejs环境
需求:在web端做一个实时性功能比较强的模块, 客户端:用websocket 服务端:node.js node.js介绍:node.js天生就是一个高效的服务端语言,可以直接使用 javascript ...
- apache -- xampp配置虚拟主机
<VirtualHost *:80> ServerName www.myblog.com DocumentRoot "F:/Code/myblog"<Direct ...
- Unity3d之Perfab
对于重复使用的游戏体可以将其制作成Perfab.首先在Project窗口中选择[Create]-[Prefab]创建一个空的Perfab.然后将该重复使用的游戏体拖到这个空的Perfab上就OK了. ...