1

I have a production mobile app running on Parse Server, hosted on DigitalOcean. This is my setup:

Droplet no1: Parse Server and Dashboard
Droplet no2: MongoDB

And this is how the client connects to the Parse Server:

let productionServerConfiguration = ParseClientConfiguration {
    $0.applicationId = "applicationId"
    $0.clientKey = "clientKey"
    $0.server = "http://domain:1337/parse"
}

Now I want to add an SSL certificate to the Parse Server, but I'm afraid of what will happen to the existing users, that still have http. Also, do I need to add an SSL certificate to the MongoDB Server?

Sotiris Kaniras
  • 198
  • 1
  • 10

1 Answers1

1

You didn't give much information on how your Parse Server is setup, but in my opinion the easiest way to accomplish what you want is to have a reverse proxy sitting between the clients and your Parse Server.

Like in this diagram:

Reverse Proxy In this setup, your clients are in the leftmost side and they access your servers through the internet; your Parse Server (and maybe your Mongo database) is located in the rightmost side of the picture (label "Servers") and the reverse proxy is in the middle. There are many reverse proxies on the market so you are free to pick the one that suits you the most, but my favourite is Nginx.

The reverse proxy is place where you will install the SSL certificate and it will be responsible to receive the requests from your clients. The clients will never access your servers directly (Parse & MongoDB). All connections will go through the reverse proxy; you just need to configure to reverse proxy to redirect the connections to the correct server (based on port, URL or any other option that you want).

As for the old clients that still access your server through http, without a SSL certificate, you can also configure the reverse proxy to redirect any http request to https before you send the request to the final destination.

Answering your last question: no, you don't need a SSL certificate on MongoDB. The SSL certificate that you install in the reverse proxy is enough.

vegidio
  • 126
  • 4