ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Посторонние символы перед заголовком ответа


  • To: nginx-ru@xxxxxxxxx
  • Subject: Re: Посторонние символы перед заголовком ответа
  • From: Станислав <korchasa@xxxxxxxxx>
  • Date: Mon, 29 Sep 2008 00:50:54 +0400
  • Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=M8atVFRvxfdJlfaCt/rUupOyxu8C1TxbIQw3C1dpViU=; b=t90xebdpLKuX4mLAABSO5RfXNJX8E57xO2nqNrGzv8fRcWDQSpdtbhVUqlWfhNHqBC ykLDJVwCjmEjnxT/9tRU9i0caboV1fopdkR+PX2s1Ei3ZIxvdlzrQMRTU+gVRKg8oI5U nDfHQX2EQ8OUiAtYJVL2wCuEZeJFabmdCZOPY=
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=LFU0k4i2QmlWLp//8lQW0ttNg23CiXXUJHd6Ut+s50Vbv9pUsUHcMiSem190Ak950B 6DtQ3wL0JQFArx19wiUhzyfg5ucPOx3D4BrtV+zaO+wm9lDIxuzg38r1UVuLBbgQfKqS dR06mhK4nmN7lYi9r6OxYPABt5bNxhmyC54oY=
  • In-reply-to: <91c9771b0809280846p1a64544asb8b1d01c5b8711fc@xxxxxxxxxxxxxx>
  • References: <48DF844C.2040208@xxxxxxxxx> <48DF8992.8060202@xxxxxxxxx> <48DF9512.30603@xxxxxxxxx> <91c9771b0809280846p1a64544asb8b1d01c5b8711fc@xxxxxxxxxxxxxx>

Борис Долгов пишет:
А какие заголовки отдает фронтэнд перед редиректом? Какой когфиг сервера/location'a?
Ясновидящие в отпуске :(
Хм. Я надеялся, что это какая-то типичная проблема. Дело не в редиректе, ошибка может появиться на абсолютно любой странице.

-----------------------nginx.conf---------------
user  apache apache;

worker_processes 7;
worker_rlimit_nofile 10240;

pid /var/run/nginx.pid;

error_log  /var/log/nginx/error_log  info;

events {
   worker_connections   2048;
}

http {
   include       conf/mime.types;
   default_type  application/octet-stream;
client_header_timeout 1m;
   client_body_timeout    1m;
   send_timeout           1m;

   client_header_buffer_size    4k;
   large_client_header_buffers  4 8k;

   gzip off;

   output_buffers   5 64k;
   postpone_output  1460;

   sendfile         on;
   tcp_nopush       on;
   tcp_nodelay      on;

   keepalive_timeout  75 20;

   include conf/servers/www.conf;
upstream main_backend {
     server   10.0.0.10:9000;
   }
}

-------------------www.conf--------------

server {
 listen        80;
 server_name   www.site.ru;

 client_max_body_size       10M;
 client_body_buffer_size    128k;
 client_body_temp_path      /var/home/www/var/client_body;

 root /var/home/www/www;

 log_format fastcgi_log '$remote_addr $request $status $body_bytes_sent'
' $http_referer $upstream_response_time $request_time $time_local [$host $http_user_agent]';

 log_format static_log '$remote_addr $request $status $body_bytes_sent'
   ' $http_referer - $request_time $time_local $host [$http_user_agent]';

 access_log    /var/log/nginx/www-nginx.access_log fastcgi_log;
 error_log    /var/log/nginx/www-nginx.error_log  error;
 rewrite_log off;

 set $fix_slash 0;
 if ($request_uri ~ "^[a-z0-9\-/]*[^/]$") { set $fix_slash 1; }
 if (-e $request_filename) { set $fix_slash 0; }
 if ($fix_slash) {
   rewrite ^(.*)$ $request_uri/ permanent;
 }

 location / {

   root /var/home/www/www;

   if (!-e $request_filename) {
     rewrite ^(.*)$ /main_app.php last;
   }
 }

 location ~ \.php$ {

   charset utf-8;

   fastcgi_pass 10.0.0.11:9000;

   fastcgi_connect_timeout 20;
   fastcgi_send_timeout 60;
   fastcgi_read_timeout 60;
   fastcgi_buffers 64 128k;
   fastcgi_temp_file_write_size 256k;
   fastcgi_intercept_errors on;

   fastcgi_param SCRIPT_FILENAME /var/home/www/www$fastcgi_script_name;
   fastcgi_param QUERY_STRING    $query_string;
   fastcgi_param REQUEST_METHOD  $request_method;
   fastcgi_param REMOTE_ADDR     $remote_addr;
   fastcgi_param REMOTE_PORT     $remote_port;
   fastcgi_param SERVER_PROTOCOL $server_protocol;
   fastcgi_param SERVER_ADDR     $server_addr;
   fastcgi_param SERVER_PORT     $server_port;
   fastcgi_param SERVER_NAME     $server_name;
   fastcgi_param SCRIPT_NAME     $fastcgi_script_name;
   fastcgi_param REQUEST_URI     $request_uri;
   fastcgi_param DOCUMENT_ROOT   /var/home/www/www;
   fastcgi_param CONTENT_TYPE    $content_type;
   fastcgi_param CONTENT_LENGTH  $content_length;
 }

 error_page  404  /404.html;
 error_page  500 502 503 504 /500.html;

 location ~* \.(jpg|js|jpeg|gif|png|css)$ {
   access_log /var/log/nginx/www-nginx.access_static_log static_log;
   expires      30d;
   if (!-e $request_filename) {
     return 404;
   }
 }
}



 




Copyright © Lexa Software, 1996-2009.