Route 53 Record Set on Different Port

前端 未结 2 1705
臣服心动
臣服心动 2021-02-01 19:19

I\'m a ruby dev and I just started to learn some Node.js.

I\'m running an instance on AWS to host my rails apps with passenger + nginx

2条回答
  •  无人及你
    2021-02-01 20:18

    This is possible through S3 redirection. Create a S3 bucket with the name

    subdomain.domain.com
    

    This bucket does not need to be public. Then, turn on Static Website Hosting in Properties and choose the Redirect response option and configure it with the following options

    Target bucket or domain: my.ip:8000
    Protocol: Leave this blank
    

    Then go to Route53 and create a Record Set with the following configuration

    • Name: subdomain.domain.com
    • Type: A-IPv4 address
    • Alias: Yes
    • Alias Target: Choose the bucket you just created in S3. If it does not appear wait for it to appear.
    • Routing Policy: Simple
    • Evaluate Target Health: No

    And that's it, you should be able to go to subdomain.domain.com and see the changes take effect after roughly 30 seconds. Best of luck!

提交回复
热议问题