Welcome! Log In Create A New Profile

Advanced

The quesion will be kill me

January 14, 2013 03:20AM
Using nginx make proxy server, the backend server are nginx,apache
Sometimes,the web is not ok !

An error occurred.
Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

Moretimes the web is ok´╝îlittle times is error...
The nginx error log is:
2013/01/14 16:02:26 [error] 31316#0: *1154349 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 61.186.137.140, server: m.xx.cn, request: "GET /pnp4nagios/index.php/graph?host=sxcq-web&srv=PING HTTP/1.1", upstream: "http://10.2.4.10:80/pnp4nagios/index.php/graph?host=sxcq-web&srv=PING", host: "m.xx.cn", referrer: "http://m.xx.cn/pnp4nagios/index.php/graph?host=sxcq-web&srv=PING"

2013/01/14 16:02:26 [error] 31310#0: *1161676 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 123.151.148.201, server: www.xx.gov.cn, request: "GET /plus/view.php?aid=3402 HTTP/1.1", upstream: "http://10.2.4.4:80/plus/view.php?aid=3402", host: "www.xx.gov.cn"


I checked backend server's log ,,, No erros in it ...

My nginx proxy conf is:

Http's section:
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 120;
client_body_timeout 300;
server_tokens off;
send_timeout 3m;
gzip on;
gzip_http_version 1.0;
gzip_min_length 1000;
gzip_buffers 4 8k;
gzip_comp_level 6;
gzip_types text/plain image/gif image/jpeg image/png text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
client_max_body_size 64M;
server {
listen 80 default;
server_name _;
return 403;
}
Proxy's section:
upstream xx{
server 10.2.4.11;
}
server {
listen 80;
server_name www.xx.cn;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root html;
index index.html index.htm;
proxy_redirect off ;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
client_max_body_size 1000m;
proxy_connect_timeout 15;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_buffer_size 512k;
proxy_buffers 8 512k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
proxy_pass http://xx;
include attack.conf;
}
location ~ .*\.(html|js|css|jpg|png|gif|flv|ico|swf)$ {
expires max;
root /home/nginx_cache/www.sxcq.cn;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
proxy_connect_timeout 15;
proxy_send_timeout 600;
proxy_read_timeout 600;
proxy_buffer_size 512k;
proxy_buffers 8 512k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path /home/nginx_cache/www.xx.cn;
proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
proxy_store on;
if ( !-e $request_filename) {
proxy_pass http://xx;
}

}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}

}



Pls help me... Thanks!
SubjectAuthorPosted

The quesion will be kill me

referconJanuary 14, 2013 03:20AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready