I am running Apache on an EC2 instance. I have added an A record with EC2 instance IP in route 53 and updated Name Server with registrar. DNS resolution is working for me.
I have two sites on two folders like this: www/admin and www/client.
I want to create two sub-domains for these two sites like this:
- admin.example.com
- client.example.com
I tried with a CNAME record with name: admin.exmaple.com and value example.com/admin which is not working.
I found one solution here:
The problem with this approach is that whatever I type in subdomain is redirected to root directory.
How do I create subdomains in route 53 without creating vhost in apache?