• nginx 做前端代理时proxy参数配置


    1.后台可登录:

    proxy_connect_timeout 300s;
    proxy_send_timeout   900;
    proxy_read_timeout   900;
    proxy_buffer_size    256k;
    proxy_buffers     4 256k;
    proxy_busy_buffers_size 256k;
    proxy_temp_file_write_size 256k;
    proxy_max_temp_file_size 1024m;
    proxy_redirect     off;
    proxy_hide_header  Vary;
    proxy_set_header   Accept-Encoding '';
    proxy_set_header   Host   $host;
    proxy_set_header   Referer $http_referer;
    proxy_set_header   Cookie $http_cookie;
    proxy_set_header   X-Real-IP  $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_next_upstream http_500 http_502 http_503 http_504 http_404 error timeout invalid_header;
    #proxy_intercept_errors on;
    proxy_intercept_errors on;
    proxy_redirect default;
    proxy_ignore_client_abort on;

    后台不可登录:

    proxy_connect_timeout 3s;
    proxy_send_timeout   9;
    proxy_read_timeout   9;
    proxy_buffer_size    32k;
    proxy_buffers     4 32k;
    proxy_busy_buffers_size 64k;
    proxy_redirect     off;
    proxy_hide_header  Vary;
    proxy_set_header   Accept-Encoding '';
    proxy_set_header   Host   $host;
    proxy_set_header   Referer $http_referer;
    proxy_set_header   Cookie $http_cookie;
    proxy_set_header   X-Real-IP  $remote_addr;
    proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header;
    #proxy_next_upstream http_502 http_503 http_504 error timeout invalid_header;
    proxy_intercept_errors on;
    proxy_redirect default;
    proxy_ignore_client_abort on;
    proxy_hide_header "Cache-Control";
    proxy_hide_header "Set-Cookie";
    proxy_hide_header "Pragma";
    proxy_hide_header "X-Powered-By";
  • 相关阅读:
    十天冲刺之三
    设计模式-模板方法模式
    设计模式-观察者模式
    设计模式-迭代子模式
    设计模式-责任链模式
    设计模式-门面模式
    1395. Count Number of Teams
    747. Largest Number At Least Twice of Others
    1160. Find Words That Can Be Formed by Characters
    1539. Kth Missing Positive Number
  • 原文地址:https://www.cnblogs.com/mikeluwen/p/7802381.html
Copyright © 2020-2023  润新知