Nginx 将你重定向的次数过多?

 环境信息系统:CentOS 7.4Nginx 1.18Tomcat 8.5通过Nginx 跳转到应用 问题描述第一次登陆后台系统后,点开页面,提示:www.test.com 将你重定向的次数过多。直接在当前页面刷新下,打开正常。每次都是第一次登陆的时候,会提示重定向次数过多。 Nginx 配置http { lim...显示全部

 环境信息

系统:CentOS 7.4
Nginx 1.18
Tomcat 8.5
通过Nginx 跳转到应用

 问题描述

第一次登陆后台系统后,点开页面,提示:www.test.com 将你重定向的次数过多。
直接在当前页面刷新下,打开正常。
每次都是第一次登陆的时候,会提示重定向次数过多。

 Nginx 配置

http {
    limit_conn_zone $binary_remote_addr zone=one:10m;
    include       mime.types;
    default_type  application/octet-stream;
    server_names_hash_bucket_size 256;
    client_header_buffer_size 256k;
    large_client_header_buffers 4 256k;
    client_max_body_size 50M;
    client_body_buffer_size   256k;
    client_header_timeout     3m;
    client_body_timeout       3m;
    send_timeout              3m;
    sendfile        on;
    tcp_nopush     on;
    fastcgi_intercept_errors on;
    keepalive_timeout  130;
    tcp_nodelay  on;
    gzip  off;
    server_tokens off;

    expires 8h;
    #gzip  on;

    server {
        listen       80;
        server_name  www.test.com;
        location / {
            proxy_pass http://192.168.11.10;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "Upgrade";
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header REMOTE-HOST $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            client_max_body_size 50m;
            client_body_buffer_size 256k;
            proxy_connect_timeout 80;
            proxy_buffer_size 256k;
            proxy_buffers 4 256k;
            proxy_busy_buffers_size 256k;
            proxy_temp_file_write_size 256k;
            proxy_next_upstream error timeout invalid_header http_500 http_503 http_404;
            proxy_max_temp_file_size 128m;
        }
     }
}
收起
参与7

查看其它 1 个回答xylhldy的回答

xylhldyxylhldy  系统工程师 , 成都麦柯

nginx 日志中没有找到这个重定向次数过多的错误信息

系统集成 · 2020-09-11
浏览2543

回答者

xylhldy
系统工程师成都麦柯

xylhldy 最近回答过的问题

回答状态

  • 发布时间:2020-09-11
  • 关注会员:2 人
  • 回答浏览:2543
  • X社区推广