ðòïåëôù 


  áòèé÷ 


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: Connection reset by peer) while reading response header from upstream



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;

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;

-- 
Siava
WEB http://siava.ru


 




Copyright © Lexa Software, 1996-2009.