首页 新闻 搜索 专区 学院

客户端连接Nginx偶尔提示无法连接到远程服务器

0
悬赏园豆:20 [待解决问题]

nginx的日志没有记录到相关连接信息

http配置:

client_header_timeout 3m;
client_body_timeout 3m;
send_timeout 3m;
client_header_buffer_size 512k;
large_client_header_buffers 4 512k;

gzip on;
gzip_min_length 1100;
gzip_buffers 4 256k;
gzip_types text/plain;

sendfile on;
tcp_nopush on;
tcp_nodelay on;

keepalive_timeout 72000;

upstream配置:

upstream TC.DataAccess{
server 192.168.0.14:6666 weight=1 max_fails=2 fail_timeout=300s;
server 192.168.0.17:6666 weight=3 max_fails=2 fail_timeout=300s;
ip_hash;
}

server主要配置:

server {
listen 7777;
server_name TC.DataAccess;

charset utf-8;

#access_log logs/host.access.log main;

location / {
root /;
index index.html;
proxy_pass http://TC.DataAccess;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_connect_timeout 70;
proxy_read_timeout 6000;
proxy_send_timeout 6000;
proxy_set_header Host $host; #:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

client_max_body_size 100m;
client_body_buffer_size 10m;

proxy_buffer_size 5m;
proxy_buffers 6 1m;
proxy_busy_buffers_size 5m;
proxy_temp_file_write_size 5m;
}

}

亚瑟王987的主页 亚瑟王987 | 初学一级 | 园豆:182
提问于:2017-02-11 08:28
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册