How to create subdomains using apache and aws elastic api?

178 views Asked by At

In our current configuration we are having one ec2 aws instance. On this we are serving one api server which is developed using laravel and one front end which is developed using angular apache. And for dns resolution we are using godaddy. Now we are having one domain let's take it as example.com.

So what actually I need is serve angular application from example.com and laravel application from apis.example.com.

And I don't want to use aws route53 service as it will be paid service again.

So is there any way through which we can acheive it without using route53 and if not how should this be solved using route53.

1

There are 1 answers

0
Mark B On BEST ANSWER

The steps would be the same using Godaddy or Route53. There is really no reason to think that Route53 would be required in this case.

  1. Assign an Elastic IP to your EC2 instance
  2. Create A records in Godaddy (or any other DNS service you want to use) for both example.com and apis.example.com that point to the Elastic IP
  3. Configure Apache on your EC2 instance to serve requests for example.com
  4. Configure Apache on your EC2 instance to send requests for apis.example.com to your Laravel app