Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to point subdomain to aws ec2

I have created sub domain of my site. Its on bigrocks. Now I have ec2 instance with elastic ip and I am running a site from there. I can access that site by IP/SITE_NAME from local browsers of current machines also. SO it runs on ec2 as well as on current machine. Now I want to link that site to my su bdomain. So how can I do that? I don't want to redirect sub domain. Browser should display the sub domain name it self and contents from aws ec2 instance Please help

like image 539
Mr x Avatar asked Oct 29 '25 17:10

Mr x


1 Answers

Login to your cpanel. go to simple DNS Zone Editor

Enter your sub domain name and IP address of aws ec2 instance in A records and click on Add.

Now you can open your subdomain/site_name and you wil see the page which is hosted on aws ec2 instance.

like image 181
NIket Avatar answered Oct 31 '25 09:10

NIket



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!