AWS Elastic Beanstalk Namecheap SSL Configuration

后端 未结 1 1351
悲哀的现实
悲哀的现实 2021-02-06 14:24

My iOS software platform runs on AWS Elastic Beanstalk and has a URL we\'ll call \"something.elasticbeanstalk.com\". I have a website we\'ll call \"website.com\" I purchased an

1条回答
  •  悲&欢浪女
    2021-02-06 15:01

    SITUATION

    -I have a Parse Server on Elastic Beanstalk with URL “something.elasticbeanstalk.com”

    -I have a domain with Namecheap called “website.com”

    WHAT I NEEDED

    I needed to make my client app connect to an HTTPS address since Apple is requiring it shortly with App Transport Security. Since I couldn’t get an SSL certificate using AWS certificate manager for “something.elasticbeanstalk.com”, I created one for “website.com”. I then needed to have my client app connect to the HTTPS “website.com” which would forward it over to “something.elasticbeanstalk.com”. This satisfied the HTTPS requirements of Apple.

    HOW TO DO IT

    1. Make an SSL certificate for “website.com” using AWS Certificate Manager. You will need to confirm the domain via a confirmation email to the administrator for it.

    2. Apple the SSL certificate for “website.com” to the AWS EB Load Balancer. Go to your AWS EB Console, click "configuration", click "Load Balancing" under the "Network Tier" category. Now under the first category which is "Load Balancer", select the SSL record you made and apply it in the "SSL certificate ID" section.

    3. Set a CNAME record for “website.com” with a host of whatever subdomain of “website.com” you want. I chose “data” as my host value and subdomain (so my subdomain is “data.website.com”). Set the value of the CNAME record to “something.elasticbeanstalk.com”. Wait for it to propagate. It’s usually pretty fast but not always.

    4. (I’m unsure if this particular step is proper but it worked for me) Set the serverURL of Parse-Server to “https://something.elasticbeanstalk.com” and the publicServerURL to “https://data.something.com”

    5. In the Parse “initializeWithConfiguration” method in your client app that enables the app to connect to the server, change the server URL to “https://data.something.com/parse”. NOTE: include the “/parse” which is the MOUNT PATH of the parse-server. This value MAY BE DIFFERENT for you depending on how you set it but I set it to “/parse” since that’s what I saw in the Parse-Server docs.

    NOTES

    -I deleted all Route53 records since they are irrelevant here since “something.com” DNS services are controlled by Namecheap.

    -A Redirect URL record in Namecheap is unnecessary

    0 讨论(0)
提交回复
热议问题