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.
Related
I have deployed a django based website on my AWS lightsail instance. the web address has a port 8000 (:8000). I own a domain on (host =fatcow.com). I have created a hosted zone on AWS and pasted the ns values to my provider(factor)'s Nameservers values. In the amazon route53, I have created a new record with a simple redirect A ipv4 and entered the resolver IP address value - my web address with port value. it doesn't work.
Also, I have read that the redirect will not work for its with port numbers. I have tried redirecting my domain to the static ip, then created another hosted zone record trying to redirect the static ip to the ip+port value - error pops up saying it is not a valid address.
I currently use the development server provided by django as it is a personal website and currently it will not have a lot of traffic - portfolio website.
Also, on my fatcow.com domain settings, the Nameservers are updated and in the whois values, new Nameservers are seen. I have only added the 4 NS values. AWS also created SOA ip values but I was not able to add them to the domain (Inputs were not taken by fatcow ).
In the NSLookup website, I can see NS values and SOA values which are on the AWS hosted zone but A records show none.
Edit: sorry for the confusion. my domain is www.chandradhar.com. I'm not a web dev but I'm trying to deploy a django based portfolio website. I have added Amazon Lightsail DNS nameservers to my domain (host=fatcow.com). the web address is :8000 port. Without the port number, the website isn't loading at all. Only with the port number along the static IP, the website loads. 'A' record isn't taking the port number. I did add a SRV record with the port number(in AWS route 53) but still doesn't work. when checked from the website nslookup.io, the nameservers are updated correctly
Not reproduceable.
> host fatcow.com
fatcow.com has address 65.254.254.33
fatcow.com mail is handled by 10 mail.fatcow.com.
Most probably your changes in DNS have already propagated.
Steps to successfully deploy one or more websites on lightsail AWS when the domain is on another website like godaddy/fatcow.
Create a dns zone in the networking section of the lightsail instance.
Copy the name servers from the dns zone and paste it in the name servers section of the domain provider (fatcow/godaddy) - it might take upto a day for the values to get updated - i used nslookup.io to see if my nameservers were updated.
Create 'A' records and SRV records pointing to the static ip of the lightsail instance.
Install Nginx
Create a simple script with the (name of the website).conf in the conf.d folder/available sites folder
Add the following script:
server
{
listen 80;
server_name domainname.com;
location / { proxy_pass http://ipAdd:PortNum;
}
}
Repeat the same code block with different domains and redirect ports. I guess we can also use 301 redirect to achieve the same.
This might or might not be the proper way of achieving what I required but it'll work.
I'm deploying my first app on EC2. I have a domain name registered, lets call it example.com. My ec2 instance has a public ip, lets say, 100.100.100.100. When I got the EC2 instance, I already have a wordpress site installed on it (the blog for my app - blog.example.com). Hitting the public ip directly goes to the blog.
My app is running on the 4000 port of this EC2 instance. I want to assign the example.com domain to this.
I'm using AWS Route 53 for the DNS. I'm clicking on create a record set, where I give the name - www.example.com to the value 100.100.100.100:4000. The type is an IP-v4. However, when I try to assign this, I get the error below:
The record set could not be saved because:
- The Value field contains invalid characters or is in an invalid format.
It's because I've specified the port of the ip in the value. How do I get example.co to point to this app on 100.100.100.100:4000? Thank you for all the help in advance!
Amazon Route53 is a global Domain Name Service (DNS).
DNS services are used to resolve DNS names (eg example.com) to an IP address (eg 100.100.100.100). However, DNS servers do not point to ports on a machine (eg port 4000).
Therefore, to refer to 100.100.100.100:4000, you would use example.com:4000.
I have a application hosted in amazon EC2 instance. My application runs at http://ec2...compute-1.amazonaws.com/index.html. We also have a domain registered as sovan.test.com. WE want to use Route53 for redirect/open http://ec2...compute URL when user used the registered domain name. How can we do this?
We are getting an error that we can not host anything with index as back. and also it do not detect http:.
Please give some advice.
Thanks
Amazon Route53 is a Domain Name Service, which can resolve names into IP addresses. For example, if a user types www.foo.com, it can return the IP address of a web server of load balancer that will respond to a request.
Note that is only resolves the domain, which is the initial part of an address. It does not resolve the path portion of a URL. For example, going to www.foo.com/index.html will result in resolving www.foo.com to an IP address, then sending a request for the index.html page to that server. The index.html portion is not part of the DNS resolution.
I have an EC2 server. I want to connect it with my Godaddy domain.
This is what I did till now:
I have a domain signed on Godaddy.
I have an EC2 server with a website running on it.
I defined the domain on Route 53 (created a "Record Set" that is: example.com):
Created a new Record Set for MX (which is very important for me!)
Created a new Record Set IPV4 that uses the Public IP of my EC2 server as a value).
Pasted the 4 DNSs from the NS Record Set row on my Godaddy account instead the existing standard ones.
http://i.stack.imgur.com/POLUc.png
Results:
My website loads as: example.com - Check!
I get Emails (myname#example.com) without any problems - Check!
The Problem: My website doesn't load when running 'www' before the domain: www.example.com
I was googling for some answers and found a lot of ways to handle domains. Some of them were even very strange (like pointing to other IP addresses which doesn't answer my question), and some were very simple that work only with static content with the S3.
Bottom line questins:
What is the normal best way to make an external domain (from Godaddy for this case) link with my EC2 server + MX working + getting the website loading with or without the 'www' ?
** It must be without creating a 'www' sub-domain for - SEO reasons.
I hope my question is well explained.
If not please comment and I will edit and add information/PrtScns.
I don't think this has anything to do with DNS.
Your webserver is probably using Virtual Hosts and isn't configured to serve the site on www.example.com
If its Apache try:
ServerName example.com
ServerAlias www.example.com
(presuming of course that a DNS record exists for www.example.com)
just create an A record with www (www.example.com) and pointed to the EC2 IP
Change your current functioning redirect to include the WWW, then follow these steps:
I just managed to figure this out yesterday:
Go to you S3 console at https://console.aws.amazon.com/s3/home and click Create Bucket. For Bucket Name enter in your naked domain name, eg for www.example.com, you would put just example.com.
Click on the magnifying glass icon next to your newly created bucket. On the menu that appears select Static Website Hosting, then click on 'Redirect all requests to another host name'. The textbox that appears should now be prepopulated with the text www.example.com. Select save.
Open your Route 53 hosted zone at https://console.aws.amazon.com/route53/home. Select your domain and click on Create Record Set. Leave the Name area blank, and leave the default type at 'A - IPv4 address'. Select Yes for Alias, and click on the Alias Target textbox. At this point a dropdown menu should appear in which you can select the S3 Website Endpoint you created in steps 1 and 2.
Lastly, click create, and enjoy your new routing set-up!
I am new in the Amazon EC2 world, I just created an app, that is located URL like this:
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
This is generated URL by Amazon EC2.
Now I would need to use my own domain name, so when I would access www.my-domain-name.com, I would like to see the content from
http://ec2-54-123-45-678.compute-1.amazonaws.com:8080
I bought the domain name on Godaddy.
Is there any way to do this in Amazon AWS dashboard or do I need to set it up in Godaddy system?
Thanks
I am answering on a more general level because I stumbled upon this thread when setting my custom domain.
In Amazon I created an instance and associated an IP to that instance. You were able to access it by typing in the amazon url
I actually used Media Temple not GoDaddy, but it will be similar. I went to the zone file and added that public url to the www
And as you can see, here is my blog actually working on the custom domain.
I set the wildcard because that way, no matter what someone types, if it is not set, then they will still see the site.
EDIT
For the root URL you should be entering your elastic IP and setting that as an A record.
First you need to set an ElasticIP for associated to that instance.
Then point the DNS entry of "www" for "my-domain-name.com" to the IP assigned in the step above.
Where you manage your DNS is another thing, can be in GoDaddy or in AWS Route53. You must adjust the delegation DNS in the "my-domain-name.com" register. Ex: your domain can be registered with GoDaddy but its delegation DNS point to Route53 so you can manage the domain from your AWS Console.
In order to setup DNS mapping you can map the existing IP 54.123.45.678 to ex: www.my-domain-name.com.
However, as you are running tomcat which is running at 8080 you need to forward the the request to the tomcat using Apache. So that you can visit www.my-domain-name.com without port 8080. If you are using linux box install Apache, apache-modjk and then configure sites.