Parse Dashboard unable to connect to server
#12 opened on Aug 29, 2016
Repository metrics
- Stars
- (29 stars)
- PR merge metrics
- (PR metrics pending)
Description
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Dashboard!
- You're running version >=2.1.4 of Parse Server.
- You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
I'm running Ubuntu 14.04 with Docker 1.11.2 on a Digital Ocean server.
docker run -d
-e DATABASE_URI=${DATABASE_URI:-xxxx}
-e APP_ID=${APP_ID:-xxxx}
-e MASTER_KEY=${MASTER_KEY:-xxxx}
-e FILE_KEY=${FILE_KEY:-xxxx}
-p 127.0.0.1:1337:1337
--name parse-server
yongjhih/parse-server
docker run -d
-p 127.0.0.1:2022:22
--volumes-from parse-server
--name parse-cloud-code-git
yongjhih/parse-server:git
docker run -d -e PARSE_DASHBOARD_CONFIG='{ "apps": [ { "serverURL": "https://localhost:1337/parse/", "appId": "xxxx, "masterKey": "xxxx", "appName": "xxxx" } ], "users": [ { "user":"Admin", "pass":"Qwerty" } ] }' -p 4040:4040 --link parse-server --name parse-dashboard yongjhih/parse-dashboard
I have parse server, cloud code and dashboard running on localhost as per configuration. I have SSL set up with Lets-Encrypt and my domain is connecting to localhost via an Nginx wrapper.
My Nginx config:
# HTTPS - serve HTML from /usr/share/nginx/html, proxy requests to /parse/
# through to Parse Server
server {
listen 443;
server_name xxxx.com;
root /usr/share/nginx/html;
index index.html index.htm;
ssl on;
# Use certificate and key provided by Let's Encrypt:
ssl_certificate /etc/letsencrypt/live/xxxx.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/xxxx.com/privkey.pem;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'xxxx';
# Pass requests for /parse/ to Parse Server instance at localhost:1337
location /parse/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:1337/parse/;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:4040/;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
}
Steps to reproduce
My Javascript Parse Web App connects to Parse Server and my MongoDB perfectly. Dashboard is the problem. Localhost won't even connect, even if I try via HTTP. If I stop securing the ports by removing "127.0.0.1", use the serverURL in the dashboard config as my server's IP "http://xx.xxx.xxx.xx:1337/parse" and add -e PARSE_DASHBOARD_ALLOW_INSECURE_HTTP=1. Then I can connect via HTTP. However I need to connect via HTTPS. My domain name set up via Nginx won't work either as the server URL option, even though I'm using my domain URL to connect my javascript web app to my parse server.
Please help. Thanks. :)