Nginx反向代理rstudio server
# 使用nginx反向代理rstudio server的配置文件
location / {
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/;
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 20d;
# Use preferably
proxy_set_header X-RStudio-Request $scheme://$host:$server_port$request_uri;
# OR existing X-Forwarded headers
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
# OR alternatively the Forwarded header (just an example)
proxy_set_header Forwarded "host=$host:$server_port;proto=$scheme;";
}
proxy_buffering off;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
上次更新: 2024/03/11, 23:50:27