Re: возврат 404 полученного от fastcgi

Igor Sysoev igor на sysoev.ru
Ср Июл 28 20:36:03 MSD 2010


On Wed, Jul 28, 2010 at 06:29:38PM +0300, Volodymyr Kostyrko wrote:

> Чего-то я не понимаю.
> 
> index.php:
> <?php
> header('HTTP/1.0 404 Dead beef')
> ?>
> 
> nginx.conf:
> location ~ .*\.php$ {
>   include /usr/local/etc/nginx/fastcgi_params;
>   fastcgi_pass unix:/tmp/.fastcgi.php.user/socket;
>   fastcgi_param SCRIPT_FILENAME /home/www$fastcgi_script_name;
> }
> 
>  > fetch -vvo- http://somesite/index.php
> scheme:   [http]
> user:     []
> password: []
> host:     [somesite]
> port:     [0]
> document: [/index.php]
> ---> somesite:80
> looking up somesite
> connecting to somesite:80
> requesting http://somesite/index.php
>  >>> GET /index.php HTTP/1.1
>  >>> Host: somesite
>  >>> User-Agent: fetch libfetch/2.0
>  >>> Connection: close
>  >>>
> <<< HTTP/1.1 200 OK
> <<< Server: nginx/0.7.67
> <<< Date: Wed, 28 Jul 2010 15:24:18 GMT
> <<< Content-Type: text/html
> <<< Transfer-Encoding: chunked
> <<< Connection: close
> <<< X-Powered-By: PHP/5.3.2
> <<<
> offset 0, length -1, size -1, clength -1
> -                                                        0  B    0  Bps<<< b
> http_new_chunk(): new chunk: 11 (11)
> <<< 0
> http_new_chunk(): end of last chunk
> Dead beef.
> -                                                       11  B   19 kBps
> 
> При этом:
> 
>  > php-cgi < index.php
> HTTP/1.0 404 Dead beef.
> X-Powered-By: PHP/5.3.2
> Content-type: text/html
> 
> Dead beef.
> 
> То ли лыжи не едут...
> 
>  > uname -a
> FreeBSD somesite 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Sat Jul 17 10:53:12 
> EEST 2010     arcade at somesite:/usr/obj/usr/src/sys/MINIMAL_8  amd64

Нужен отладочный лог запроса, там видно, что пришло от fastcgi.


-- 
Игорь Сысоев
http://sysoev.ru



Подробная информация о списке рассылки nginx-ru