• nginx 配置https upstream 跳转失败




    访问首页没问题,但是在登录跳转重定向时域名被修改成upstream的名字

    如果需要跳转的话会出现下面的情况:

    http://test-xxx-emove_pools/beehive/index

     server {
        listen 80;
        listen 443 ssl;
        server_name test-xxxx-emove.xxxxxx.com;
        ssl on;
        ssl_certificate /etc/cert/xxxxx3.pem;
        ssl_certificate_key /etc/cert/xxxx3.key;
        ssl_session_cache shared:SSL:1m;
        #ssl_ciphers HIGH:!aNULL:!MD5;
        ssl_protocols SSLv2 SSLv3 TLSv1;
        ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
        ssl_prefer_server_ciphers on;
        location / {
            proxy_pass http://test-xxxxx-emove_pools;
    #增加下面内容
            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   Host             $host;
  • 相关阅读:
    verilog RTL编程实践之四
    TB平台搭建之二
    hdu3466 Proud Merchants
    poj2411 Mondriaan's Dream (用1*2的矩形铺)
    zoj3471 Most Powerful
    poj2923 Relocation
    hdu3001 Travelling
    poj3311 Hie with the Pie
    poj1185 炮兵阵地
    poj3254 Corn Fields
  • 原文地址:https://www.cnblogs.com/bass6/p/6237552.html
Copyright © 2020-2023  润新知