Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Can I point more than one domain name to an instance on AWS?

Posted on 2016-11-09
4
Medium Priority
?
127 Views
Last Modified: 2016-11-15
I'm looking to use AWS free tier for developing my sites on (moving from a current shared server).

1. I have example.com, example.ca, and example.org domain names. I'd like all these to point to my free tier t2.micro instance so that anyone entering these domains will land on my index page.

Does AWS allow this? If so, how?

2. I have 3 domain names:
example_dev.com for development
example_beta.com for my beta testers to use as I develop the next phase
example_launch.com as the eventual domain for users to use as I continue work on example_dev.com and example_beta.com.

Do I need separate AWS instances to do this, or can I somehow use one free tier instance and redirect each domain request to its own index_dev.php/index_beta.php/index.php page?
0
Comment
Question by:Torquil Beavis
  • 2
4 Comments
 
LVL 15

Assisted Solution

by:Phil Phillips
Phil Phillips earned 600 total points
ID: 41881477
For #1, yes you can. Easiest way would be to have the webserver handle it for you. You can do this with "virtual hosts" with apache, or "server blocks" with nginx.

For #2, you can also use virtual hosts/server blocks for that (each separate domain gets its own root).  However, I'd be careful with that. If the code on one of the domains misbehaves and/or the instance goes down, then all of those domains are affected.
0
 
LVL 2

Accepted Solution

by:
António Sargento earned 1400 total points
ID: 41882565
1. On the DNS that hosts your domains you need to create a CNAME record or a A record that points to the t2.micro address.
If your t2.micro have a IP address, then create a A record. Otherwise create a CNAME.
0
 

Author Comment

by:Torquil Beavis
ID: 41883127
António, if I want to use https for every page on each web site, how is this done on AWS? I do not have my own SSL certificates at this point of development.
0
 
LVL 2

Assisted Solution

by:António Sargento
António Sargento earned 1400 total points
ID: 41883484
You can use the Certificate Manager to generate one.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article provides a guide on how to optimise your costs within your AWS infrastructure when using some of the common services such as EC2, EBS, S3, Glacier, CloudFront, EIP & ELB.
Microservice architecture adoption brings many advantages, but can add intricacy. Selecting the right orchestration tool is most important for business specific needs.
Steps to create a PostgreSQL RDS instance in the Amazon cloud. We will cover some of the default settings and show how to connect to the instance once it is up and running.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question