Deploy dashboard with nginx

I’m currently migrating our Parse backend to AWS. I have Parse and Nginx deployed in Docker containers with the following Nginx setup:

    location / {
        proxy_set_header   Host ${API_HOSTNAME};
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host $server_name;
        proxy_pass         http://${API_HOSTNAME}:${API_PORT}/;

And when setting up the Parse server I use http://localhost:${API_PORT} as the serverURL. If I try to use the public URL as the serverURL it tries to connect before the nginx container is deployed.

So even though I access Parse via https the internal connection is only on http.

When I try to launch the Parse Dashboard I get the error Parse Dashboard can only be remotely accessed via HTTPS.

Not sure what to do here to get it to work. Any thoughts would be appreciated.

In the future if anyone is reading this - apparently all it takes is reading the documentation properly:

I needed to set trustProxy: 1 in the dashboard config and that was enough to get it to work.

1 Like