I have created static ip in lightsail and attached it to the django instanse. I bought domain name from godaddy. I then created domain zone in lightsail and created 2 DNS records type "A" with the following:
#.drmahahabib.com
www.drmahahabib.com
Then i copied the name servers from the same page for my lightsail then took that to godaddy site and changed the name servers there.
Now i get the page that confirms that the lightsail is working but not the site instense of django. do i need to do some modification?
below is the screenshot or just visit the webpage.
my site
If you are using the Django internal dev server use
www.drmahahabib.com:8000
Here 8000 is the port on which you ran the Django server. If you are using another port replace 8000 with your port number
If you want to make your site live on www.drmahahabib.com then you have to configure Apache to serve your application.
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 have deployed a simple html website running on NGINX on a AWS EC2 server. I intend to host 2-3 static websites on this server. For the time being, I have configured only 1 server block and hosted the website.
When I type the ip address/public dns name of the server in the browser, I can see my website. My domain name is registered with another service provider.
How should I update the Nameserver records in my domain registrar account? Should I just update the public ip address in the name server field or should I update the public dns name?
My domain registrar is asking for two name server details as compulsory fields. If I update the same public ip address twice, its not allowing me to save.
Please advise. I want to know the nameserver details for my EC2 based website. My website is not hosted on Amazon Route53.
Do not update your nameserver records, these are records you would use to configure where your DNS records should be resolved.
Instead you need to update/create an A record that points from the domain to your new host IP.
I have a Django Web App that is currently live on digital ocean with an IP address say w.x.y.z, I have also bought a domain name say example.com, how can i add this to my app so that, when i go to example.com , I get to my website which currently is only accessible through the IP. Any advice is appreciated. I'm new to this
Buy/Register your Domain Name with Domain Name providers.
You need to mention your IP in your DNS Management side at Domain Name service providers.
At Django Side - you just make sure to add your Domain Name into settings.py file, in ALLOWED_HOSTS
And you are done!
I have a basic Django website running on an AWS EC2 instance. Command I use to run server:
python3 manage.py runserver 0.0.0.0:8000
Website is accessible when I used the public IP of the EC2 instance in the browser.
EC2 Security group settings
Next step I tried was to set up DNS using AWS Route53. Created a hosted domain as shown here -
Hosted Domain
I have added record sets for www.mysite.com. and mysite.com.
My domain is registered with namecheap.com and I have added the 4 name servers shown in my hosted domain to it in the custom DNS section under name servers.
The state of my domain on whatsmydns good. I have created a health check under route53 and it shows red. The website is not accessible when I type in www.mysite.com in the browser.
I tried pinging the domain. It times out but maps to the correct public IP.
What am I missing here? Please advise.
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.