[英]Nginx and PHP-FPM on two separated server
我有两个分离的服务器。 第一个是具有192.168.122.2 ip addr的Nginx服务器。 第二个是IP地址为192.168.122.3的PHP-fpm服务器。 我必须修改我的nginx才能使用其他php-fpm服务器。
我的nginx配置:
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php5-cgi alone:
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 192.168.122.3:9000;
fastcgi_buffers 16 32k;
fastcgi_buffer_size 64k;
# With php5-fpm:
#fastcgi_pass unix:/var/run/php5-fpm.sock;
}
在/etc/php5/fpm/pool.d/www.conf中,我添加了监听IP:
listen = 192.168.122.3:9000
但我收到502错误的网关错误。
我在nginx上遇到了以下错误:
2016/01/24 03:11:05 [error] 3902#0: *4 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 192.168.122.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://192.168.122.3:9000", host: "192.168.1.179:8084"
2016/01/24 03:11:05 [alert] 3902#0: *4 write() to "/var/log/nginx/access.log" failed (28: No space left on device) while logging request, client: 192.168.122.1, server: _, request: "GET / HTTP/1.1", upstream: "fastcgi://192.168.122.3:9000", host: "192.168.1.179:8084"
我怎么解决这个问题?
您的配置看起来不错,但是基于第二条日志行,您缺少磁盘空间,并且会导致各种错误,包括与后端服务器的连接。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.