【问题标题】:Parse dashboard with nginx使用 nginx 解析仪表板
【发布时间】:2018-07-16 01:39:43
【问题描述】:

我正在运行 Parse 仪表板和服务器,在 Express 中托管在 AWS 上的多容器 Docker 环境中,并使用 nginx 作为反向代理。服务器工作正常,但我无法访问仪表板。

这是我的配置:

server {
  listen 80;
  server_name mydomain.elasticbeanstalk.com;

  location /app1/ {
    proxy_pass http://mydomain.elasticbeanstalk.com:4040/;
  }
  location /app2/ {
    proxy_pass http://mydomain.elasticbeanstalk.com:4041/;
  }
  location /app3 {
    proxy_pass http://mydomain.elasticbeanstalk.com:4042/;
  }
}

/app1 具有 Parse 仪表板和服务器(安装在 /dashboard 和 /parse)。 /app2 和 /app3 现在只是占位符;最终我希望在那里运行单独的 Parse 服务器。

我可以通过http://mydomain.elasticbeanstalk.com/app1/parse 访问 Parse 服务器。但是,我希望能够通过http://mydomain.elasticbeanstalk.com/app1/dashboard 访问仪表板,但是当我将该网址放入浏览器时,它似乎重定向到http://mydomain.elasticbeanstalk.com/dashboard,然后出现404 错误。

我还需要在 nginx 配置中添加其他内容吗?还是 Parse 仪表板中的其他设置?

【问题讨论】:

    标签: nginx parse-dashboard


    【解决方案1】:

    我认为这是解析仪表板mountPath 选项的问题。不过,我现在找到了解决方法。在parse-dashboard/Parse-Dashboard/app.js 的第 62 行。将const mountPath = getMount(app.mountpath); 更改为const mountPath = '/your-path' + getMount(app.mountpath);

    在您的情况下,它应该看起来像 const mountPath = '/app1' + getMount(app.mountpath);

    【讨论】:

      猜你喜欢
      • 2017-05-17
      • 1970-01-01
      • 2016-08-04
      • 1970-01-01
      • 2021-12-25
      • 1970-01-01
      • 1970-01-01
      • 2020-04-09
      • 2020-01-08
      相关资源
      最近更新 更多