nginx配置

        # ok
        location / {
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-NginX-Proxy true;
       
       
            proxy_pass http://r_server;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
        # ok 
        location /r/ {
            rewrite ^/r/(.*)$ /$1 break;
            proxy_pass http://127.0.0.1:800;
            proxy_redirect http://127.0.0.1:800/ $scheme://$host/r/;

            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # zkk
            proxy_set_header X-NginX-Proxy true;  # zkk

            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }


        # ok
        location /ipython {
    
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # zkk
            proxy_set_header X-NginX-Proxy true;  # zkk
    
    
            proxy_pass http://ipython_server;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }

你可能感兴趣的:(nginx)