skip to Main Content

I have bought a domain in aws, and I have a PC in my home which I use as server, how can I redirect/serve the traffic between aws and my server’s public IP?

The server is listening to the port 8002 and has ip 192.168.1.x
I exposed the port 8002 in the router to 192.168.1.x:8002

If I go to my server’s public ip and port (eg: 203.0.113.x:8002) I can see my website, but when I modify in Route53 the destination (A) set my IP, and I go to mywebsite.com it doesn’t load the site, instead it load the apache default page.

In my server I have modified my apache2 configs to set the ServerName as follow:

ServerName www.mywebsite.com
ServerAlias mywebsite.com

I followed the info in https://aws.amazon.com/premiumsupport/knowledge-center/redirect-domain-route-53/ but in the last step when I want to select the created bucket it doesn’t appear in the list.

2

Answers


  1. Make sure your internet router at home allows you to connect on this ip from external network ( NAT may be reuqired).

    Look like the procedure you sent involves hostname redirection with s3 which i’m not sure it is what you want to do.

    Login or Signup to reply.
  2. Note
    Above link you have mentioned is for redirect form one domain to another(like example.com to somedomain.com)

    Follow the below steps for your case:-

    • Create A-record in route53 and add the CANAME if anything there.
      E.g:- example.com A-record 123.45.67.89
      http://www.example.com CNAME example.com
    • Check the TTL(if you have TTL value high wait for some time to reflect all DNS servers)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search