【发布时间】:2015-03-22 23:04:58
【问题描述】:
您好,我正在尝试使用反向代理设置 RStudio 服务器。
这是我的 Nginx 配置
user nginx;
worker_processes 1;
# Defines a file that will store the process ID of the main process.
pid /var/run/nginx.pid;
events {
# Sets the maximum number of simultaneous connections that can be opened by a worker process.
worker_connections 1024;
}
http {
server {
# Running port
listen 80;
# Proxying the connections
location /rstudio/ {
rewrite ^/rstudio/(.*)$ /$1 break;
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/rstudio/;
}
}
}
不幸的是,我收到了 502: Bad Gateway 错误。你有什么主意吗? 据 netstat 报告,8787 已打开
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::8787 :::* LISTEN -
RStudio 和 nginx 在两个独立的 docker 容器上运行,这些容器都打开了端口
【问题讨论】:
-
添加/删除斜线没有任何变化