Parse dashboard with nginx

529 views Asked by At

I am running the Parse dashboard and server, hosted in Express in a multi-container Docker environment on AWS with nginx as a reverse proxy. The server works fine, but I can't access the dashboard.

Here's my config:

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 has the Parse dashboard and server (mounted at /dashboard and /parse). /app2 and /app3 are just placeholders for now; eventually I'm hoping to run separate Parse servers there.

I can access the Parse server just fine at http://mydomain.elasticbeanstalk.com/app1/parse. However, I would expect to be able to get to the dashboard at http://mydomain.elasticbeanstalk.com/app1/dashboard, but when I put that url into my browser, it seems to redirect to http://mydomain.elasticbeanstalk.com/dashboard, and then gets a 404 error.

Is there something else I need to being in the nginx config? Or some other setting in the Parse dashboard?

1

There are 1 answers

0
Alex Taxiera On

I believe this to be a problem with parse dashboards mountPath option. I found a work-around for now though. On line 62 of parse-dashboard/Parse-Dashboard/app.js. Change const mountPath = getMount(app.mountpath); to const mountPath = '/your-path' + getMount(app.mountpath);

In your case it should look like const mountPath = '/app1' + getMount(app.mountpath);