While preparing to submit an app, I discovered that Apple requires that all calls must be in HTTPS. In my code, the server URL in SyncUser.logIn
is just a normal plain HTTP
call http://mywebsite:9080
.
Details of my configuration
- I have a registered domain
http://example.com
. It's only a domain and nothing is hosted under it. - ROS is installed on Amazon EC2 instance (Ubuntu 16.04)
- From the domain registrar of
http://example.com
, I pointed the URL to the elastic IP address on my EC2 instance. - I can access the realm dashboard just fine through:
http://example.com:9080
Dilemma
SSL / HTTPS is a new territory for me. I did a bit of reading and I realized that I need an SSL certificate for my domain. However:
- I issued a certificate for the domain through AWS Certificate Manager, but it cannot be deployed onto my instance. EC2 isn't supported.
- I also tried certbot — it generated keys which are saved under the /etc directory of my EC2 instance, but I don't know how to make them in use.
So when I enter my website in an SSL checker, it rightly says that no SSL certificates were found.
Do I need to opt-out of AWS?
I found an answer here but it seems like an outdated answer (or probably too hacky). I also found these slides that do the whole trick, but they totally went over my head.