zixingchedechegulu 2020-04-14 21:35 采纳率: 0%
浏览 679

前台访问服务器时,nginx跳转服务器时报504错误,调整fastcgi_send_timeout=3000也不行

操作目的:导出数据到Excel文件里。数据量在6千左右,10个字段

nginx的error.log:
2020/04/14 19:44:30 [error] 34255#34255: *89271 connect() failed (111: Connection refused) while connecting to upstream, client: 114.242.249.29, server: 域名, request: "POST /client.do HTTP/1.1", upstream: "http://服务器IP:89/client.do", host: "域名:89"
前台错误:
图片说明

nginx.conf:

http {

include       /etc/nginx/mime.types;
default_type  application/octet-stream;

log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log  /var/log/nginx/access.log  main;

fastcgi_buffers 10 128k;
send_timeout 650;
server_tokens  off;
sendfile        on;
#tcp_nopush     on;
keepalive_timeout 320;
  proxy_read_timeout 3600;
  proxy_send_timeout 3600;
fastcgi_connect_timeout 300;  
fastcgi_send_timeout 300;  
fastcgi_read_timeout 300; 
#gzip  on;
proxy_ignore_client_abort on; #不允许代理端主动关闭连接
include /etc/nginx/conf.d/*.conf;

}

include添加的conf文件:

server {

set $block_sql_injections 0;
if ($query_string ~ “union.*all.*select.*”) {
  set $block_sql_injections 1;
}
if ($block_sql_injections = 1) {
  return 444;
}
listen       80;
server_name  域名;

large_client_header_buffers 4 64k;
client_max_body_size 300m;
client_body_buffer_size 256k;
proxy_connect_timeout 7200;
proxy_read_timeout 7200;
proxy_send_timeout 7200;
proxy_buffer_size 256k;
proxy_buffers   4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;

location / {
    proxy_http_version 1.1;
    proxy_set_header Host $host:80;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    client_max_body_size 300m;
      client_body_buffer_size 1m;
    proxy_pass http://server_weaver;
}  

}

  • 写回答

1条回答 默认 最新

  • dabocaiqq 2020-04-15 00:47
    关注

    前台访问服务器时,nginx跳转服务器时报504错误,调整fastcgi_send_timeout=3000也不行

    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀