Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Связка nginx/fastcgi возвращает пустой контент и статус 2 00
- To: nginx-ru@xxxxxxxxx
- Subject: Связка nginx/fastcgi возвращает пустой контент и статус 2 00
- From: "danchenkov" <nginx-forum@xxxxxxxx>
- Date: Tue, 24 May 2011 17:52:23 -0400
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mickey.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=YcM4GMTOOlriG92qZ2GIp+E6SDn11FIqO68cVXNsKR8=; b=KLIADtJm8qZj1lqLXdVtBvjw8Otb7vJQWCnv3Axea+6EOTWFaQQroa+zbdq5Ttbr2mKpXOaBO4263+DHid/8cKGI2QWIr6Tj/ef6JEFpH8eiAeA2alw+RjJNi21RPaJw;
Никак не могу даже увидеть, где ошибка.
nginx работает, отдаёт статичные файлы и
бэкэнд к apache работает хорошо. Хочу
поднять php/fpm.
fastcgi занимает сокет или порт, но не
возвращая контент в nginx, возвращает
нормальные заголовки и статус 200, но без
контента.
$document_root и $fastcgi_script возвращают
корректные значения (в логах).
Доступ к папке для nobody на чтение есть.
php-cgi index.php возвращает корректный
контент.
Gentoo, php собран с модулями cli, cgi, fpm, apache2
access.log
---------------
127.0.0.1 - [25/May/2011:00:54:48 +0400] "GET /index.php HTTP/1.1" 200
160 ["/var/www/localhost/htdocs/index.php"]
error.log
---------------
2011/05/25 00:54:48 [info] 16375#0: *1 client 127.0.0.1 closed keepalive
connection
nginx.conf
---------------
worker_processes 1;
user nginx nginx;
pid /var/run/nginx.pid;
error_log /var/log/nginx/error_log info;
events {
worker_connections 1024; # increase if you have lots of clients
accept_mutex off; # "on" if nginx worker_processes > 1
use epoll; # enable for Linux 2.6+
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format test
'$remote_addr $remote_user [$time_local] '
' "$request" $status $bytes_sent '
' ["$document_root$fastcgi_script_name"] ';
sendfile on;
tcp_nopush on; # off may be better for *some* Comet/long-poll stuff
tcp_nodelay off; # on may be better for some Comet/long-poll stuff
gzip on;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 500;
gzip_disable "MSIE [1-6]\.";
gzip_buffers 4 8k;
gzip_types text/plain text/xml text/css
text/comma-separated-values
text/javascript application/x-javascript;
server { # localhost test
listen 80;
server_name localhost;
access_log /var/log/nginx/localhost-access.log test;
error_log /var/log/nginx/localhost-error.log info;
location / {
root /var/www/localhost/htdocs;
index index.php;
}
location ~ \.php$ {
root /var/www/localhost/htdocs;
fastcgi_pass unix:/var/run/fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
php-fpm.conf
---------------
pid = /var/run/php-fpm.pid
error_log = /var/log/php-fpm/error.log
log_level = notice
[www]
listen = /var/run/fpm.sock
user = nobody
group = nobody
pm = static
pm.max_children = 20
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,200535,200535#msg-200535
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|