大网数据广告活动
服务器运维问答

SSL on a Parse Server

· 52CE 我爱测

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 productio…

问题原文

原帖链接 · Sotiris Kaniras · CC BY-SA 4.0

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?

已采纳解答

原帖链接 · vegidio · CC BY-SA 4.0

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:

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-12-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。