for my master thesis i want to set up a parse-server to handle the backend. I'm an engineer not a programmer, so there are some issues i ran into. Most of them could be solved by searching the web but this on is a bit tricky. I'm from Germany an my Professor want me to put the data on a server located in Germany.
I got kind of a VPS Droplet running Ubuntu 18.04 LTS and a domain from my University and installed the following to this point:
I also installed parse-server-example repo and parse-dashboard which runs fine with HTTP.
Next step is to secure MongoDB so i followed the following tutorial and everything worked as expected till the point when i tried to connect to the db.
When connecting to mongoDB i get this response:
connecting to: mongodb://127.0.0.1:27017/
2018-09-15T01:12:32.808+0200 W NETWORK [js] The server certificate
does not match the host name. Hostname: 127.0.0.1 does not match SAN(s): xxxxxx.de www.xxxxxx.de
MongoDB server version: 4.0.2
Now i'm stuck. Reading the mongoDB docs was interesting but not really helpful in my case.
I found the command...
mongo --host 127.0.0.1:27017
... and tried the VPS IP and also my domain name heading to the Server IP but it does not worked.
Although the hosts flag trick is a nice hack in general there's now an easier way to do this specifically for this use case:
you can use "--sslAllowInvalidCertificates" as a flag...
Needless to say, if security is a concern, use this with due discretion.
[src: https://docs.mongodb.com/manual/reference/configuration-options/#net.ssl.allowInvalidHostnames]