1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
| upstream upstream_groot { server localhost:8888; keepalive 32; } location = /groot { rewrite ^/(.*)$ $1/ permanent; } location /groot { error_page 403 = @proxy_groot; deny 127.0.0.1; allow all; root /some-webroot; try_files $uri @proxy_groot; } location @proxy_groot { proxy_read_timeout 300s; proxy_pass http://upstream_groot; proxy_set_header Host $host; proxy_set_header X-Real-Ip $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } location ~ /groot/api/kernels/ { proxy_pass http://upstream_groot; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade "websocket"; proxy_set_header Connection "Upgrade"; proxy_read_timeout 86400; } location ~ /groot/terminals/ { proxy_pass http://upstream_groot; proxy_set_header Host $host; proxy_http_version 1.1; proxy_set_header Upgrade "websocket"; proxy_set_header Connection "Upgrade"; proxy_read_timeout 86400; }
|