Connection reset by peer) while reading response header from upstream

Igor Sysoev is at rambler-co.ru
Sat Jul 21 21:00:45 MSD 2007


On Sat, Jul 21, 2007 at 08:52:12PM +0400, Siava wrote:

> Igor Sysoev пишет:
> >
> >>Жалко, что ничего не сделать, а ведь nginx очень! здорово разгружает 
> >>Apache, но может я поковыряюсь и что-нибудь сам сделаю.. хотя в данный 
> >>момент уже ковыряюсь в сторону Fast-CGI :) (почти справился, но никак 
> >>понять не могу, почему запросы заканчивающиеся на слеш / отрабатываются 
> >>нормально, а без слеша - 404).
> >>    
> >
> >А как выглядит конфигурация ?
> >
> >  
> Сорри за небольшой оффтопик, к основной теме это уже не относится, 
> конфиг этот собирал читая рассылку:
> 
> nginx.conf:
> 
> worker_processes  2;
> events {
>     worker_connections  1024;
> }
> http {
>     include         /usr/local/nginx/conf/mime.types;
>     default_type    application/octet-stream;
>    sendfile    on;
>    tcp_nopush  on;
>    tcp_nodelay on;
>   
>    client_header_timeout  30;
>    client_body_timeout    60;
>    send_timeout           60;
> 
>    keepalive_timeout  15;
>   
>    connection_pool_size        256;
>    client_header_buffer_size   1k;
>    large_client_header_buffers 4 4k;
>    request_pool_size           4k;
>    client_max_body_size        16m;
> 
>    postpone_output     1460;
> 
>    access_log off;
> 
> 
>     server {
>        listen       80;
>        server_name  localhost 172.16.0.5;
>         set                $srv_root    "/var/www/htdocs";
> 
> 
>        location ~* ^.+\.(gz|jpg|jpeg|gif|html|css|js|png|xml)$ {
>            root        $srv_root;
>            expires     30d;
>            access_log  off;
>        }
> 
>        location / {
>            root                $srv_root;
>            index               index.php;         
>        }
> 
>        location ~ \.php$ {
>            root                $srv_root;
>            index               index.php;
>            fastcgi_pass   127.0.0.1:9999;
>            include             conf/fastcgi_params.conf;
>        }
> 
>     }
> }
> 
> fastcgi_params.conf:
> 
> fastcgi_index index.php;
> fastcgi_connect_timeout 15;
> fastcgi_send_timeout 300;
> fastcgi_read_timeout 300;
> 
> fastcgi_param   DOCUMENT_ROOT   $srv_root;
> fastcgi_param   SCRIPT_FILENAME $srv_root$fastcgi_script_name;
> fastcgi_param   PATH_TRANSLATED $srv_root$fastcgi_script_name;

Возможно, мешает PATH_TRANSLATED, можно попробовать его убрат.

> fastcgi_param   SCRIPT_NAME     $fastcgi_script_name;
> fastcgi_param   QUERY_STRING    $query_string;
> 
> fastcgi_param  REQUEST_METHOD   $request_method;
> fastcgi_param  CONTENT_TYPE     $content_type;
> fastcgi_param  CONTENT_LENGTH   $content_length;
> 
> fastcgi_param   REDIRECT_STATUS 200;
> fastcgi_param   SERVER_ADDR     $server_addr;
> fastcgi_param   SERVER_PORT     $server_port;
> fastcgi_param   SERVER_PROTOCOL $server_protocol;
> fastcgi_param   SERVER_SOFTWARE "nginx";
> fastcgi_param   GATEWAY_INTERFACE "CGI/1.1";
> fastcgi_param   SERVER_NAME     $server_name;
> fastcgi_param   REQUEST_URI     $request_uri;
> fastcgi_param   REMOTE_ADDR     $remote_addr;
> fastcgi_param   REMOTE_PORT     $remote_port;


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





More information about the nginx-ru mailing list