简体   繁体   中英

AWS Route53 sub domain

Can anyone tell me how to set a sub-domain in AWS Route53?

I am entirely new to AWS and a few hours ago I needed to setup a domain name to point at an EC2 instance.

I successfully created a hosting zone with my registered domain configured.

Next, I created an A record and specified the IP Address of the EC2 instance.

My problem is my website, on the EC2 instance, is in a subdirectory. So when I attempt to save the value of the A record as *.*.*.*/my-subsite , the Route53 system refuses to accept my input.

I received the following error:

The record set could not be saved because: - The Value field contains invalid characters or is in an invalid format.

UPDATE:

Thanks @Chris, for your answer. I did as you directed and configured documentroot in /etc/apache2/sites-available/000-default.conf to my-site .

My problem is there is a subsite beneath my-site. I created /etc/apache2/sites-available/sub-site.conf and set documentroot to my-subsite/sub-site .

However, when I attempt visiting www.mysite.com/subsite, the browser redirects to www.mysite.com

DNS is a mapping from a hostname to an IP address, period.

You will need to configure your web server so that it delivers your content from the appropriate directory. If you're using an apache web server, you want to set the DocumentRoot to the appropriate directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM