I can’t load parse dashboard through domain, hosted in digitalocean vps - ubuntu 20.04
full (strict) ssl - cloudflare
dashboard is accessible through direct IP address access - “htt p://ipaddress:4040/login”
nginx - reverse proxy enabled for dashboard and server, reverse proxy working for parse server but failing on dashboard.
when i try to load “htt ps://mydomain.com/dashboard” - it redirects to “htt ps://mydomain.com/login” with 404 Not found page
nginx config on /etc/nginx/sites-enabled/domain.com
# HTTP - redirect all requests to HTTPS
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
return 301 https://$host$request_uri;
}
# HTTPS - proxy requests to /parse-server/
# through to Parse Server
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /etc/ssl/cert.pem;
ssl_certificate_key /etc/ssl/key.pem;
ssl_client_certificate /etc/ssl/cloudflare.crt;
ssl_verify_client on;
server_name domain.com www.domain.com;
root /usr/share/nginx/html;
index index.html index.htm index.nginx-debian.html;
# Pass requests for /parse/ to Parse Server instance at localhost:1337
location /parse-app/ {
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/app/;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
}
location /dashboard/ {
proxy_pass http://localhost:4040/dashboard/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}
parse server json
{
"appName": "AppName",
"databaseURI": "mongodb://localhost:27017/app",
"appId": "DJFKASJFI3S8DSJFDH",
"masterKey": "823JKHR87SDFJSDHF8DFHASFDF",
"serverURL": "http://localhost:1337/app/",
"publicServerURL": "https://domain/parse-app/",
"port": 1337,
"mountPath": "/app"
}
dashboard config json
{
"apps": [
{
"serverURL": "http://ipaddress:1337/app",
"appId": "DJFKASJFI3S8DSJFDH",
"masterKey": "823JKHR87SDFJSDHF8DFHASFDF",
"allowInsecureHTTP": "true",
"appName": "appname"
}
],
"users": [
{
"user":"adminapp@4421",
"pass":"appoadmin@4444#"
}
],
"iconsFolder": "icons"
}
parse server is working through both domain and direct ipaddress:1337
parse dashboard is only available through ipaddress:4040 and it’s working fine
when i try to access using https://domain/dashboard/ it is redirected to https://domainname.com/login and showing a 404 page
1337, 4040 ports are open