1. 配置错误
2. 资源耗尽
3. 其他原因
-
首先我们需要让浏览器进行访问
修改nginx的配置文件
vim/usr/local/nginx/conf/vhosts/111.conf
server { listen 80; server_name www.111.com; // 域名地址 index index.html index.htm index.php; root /data/www/; location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/tmp/www.sock; // 修改sock #fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /data/www$fastcgi_script_name; } }
[global] pid = /usr/local/php/var/run/php-fpm.pid error_log =/usr/local/php/var/log/php-fpm.log [www] listen = /tmp/www.sock user = php-fpm group = php-fpm listen.owner = nobody //定义属主 listen.group = nobody //定义属组 pm = dynamic pm.max_children = 50 pm.start_servers = 20 pm.min_spare_servers = 5 pm.max_spare_servers = 35 pm.max_requests = 500 rlimit_files = 1024
-
配置完之后重启“php-fpm”
/etc/init.d/php-fpm restart
listen.owner = nobody //定义属主 listen.group = nobody //定义属组这两个配置就是定义socket的属主和属组是谁。除了这个还有一种方法
listen.mode = 666
这样nobody也可以有读取权限了。转载于:https://my.oschina.net/u/4083081/blog/3013934
发表评论: