Request to an Ec2 instance return 403 after configure an elastic IP - amazon-web-services

I'm facing an issue with my ec2 instance. Until now, I had an ec2 instance working with an IP like this: ec2-xx-xxx-xxx-xxx.compute-1.amazonaws.com.
Now I configured an elastic IP to make that instead of use the default domain uses one of my own.
Something goes wrong because now a receive a 403 if I make a request pointing to my new domain.
I'm check that I'm still able to connect to my Ubuntu server 20.04 LTS through SSH. Only have to change the host name to my new domain.(I'm using PuTTy)
Searching on internet if found that the problem can be that my machine still have the old domain in some config files. I don't have experience with Ubuntu servers. I try to find the http.conf file or the apache2 directory in etc., but no one is present.....
I don't know what to do next.
I have to change some configuration file? In that case, which one?
I leave you some images from my machine:
Root
etc folder
For further information, the security group of my ec2 instance have these rules:
Any help will be appreciated. Thanks
-EDIT
I'm trying to access the server, making a request, with Postman like this.
And that is the error:
For more information. I implemented my ec2 using this video:ec2 video
And I changed the domain with that video:link ec2 with namecheap domain

I'm afraid it is a propagation issue, that takes more time than the 48 hours, because now it starts to works without changing absolutely nothing. Sorry

It appears that your requirement is to point bochogame.com to an Elastic IP address.
You can do this by using a DNS Service, such as Amazon Route 53. You would create a A-Record record that points that domain name to the IP address.
If you are unfamiliar with these concepts, I recommend watching some YouTube videos such as DNS with AWS Route 53 - YouTube.

Related

Connect AWS EC2 instance to a domain on GoDaddy

I have an AWS EC2 instance. I created on the AWS console an elastic IP address ec2-XX-XX-XX-XXX.yy-yyyy-X.compute.amazonaws.com, and I got a domain name "my-domain.com" from GoDaddy.com
I used this tutorial and others which were very similar to "link" my-domain.com to the EC2 instance elastic address. I went through all the steps, in the DNS manager, on GoDaddy, and I waited more than 72h now. When I try to connect to my-domain.com I am however redirected to a GoDaddy page saying that my-domain.com is parked free. Is there something that I am missing? Is the tutorial I followed outdated?
I am not sure how relevant it is to the above but I have an API set up on that AWS EC2 instance which is correctly responding when I go to http://ec2-XX-XX-XX-XXX.yy-yyyy-X.compute.amazonaws.com/api/my-endpoint. I am using Nginx and Gunicorn to deploy the api and it works like a charm. I however get redirected to "my-domain.com is parked free" when I try http://my-domain.com/api/my-endpoint.
And I am using indeed "http", in lieu of "https", to make connections to the api for now, I am looking to get a proper domain name attached to the EC2 instance before I go through the procedure of getting a proper SSL certificate. Could that be an issue too?
Thank you in advance
Cheers
[EDIT]
This is my config on GoDaddy.com
Where the black box is the copied / pasted "Public IPv4 address" (which corresponds to the elastic IP address I set up for the EC2 instance). Should I use the Public IPv4 DNS instead? (ecX-XX-XX-XX-XXX.yy-yyyy-X.compute.amazonaws.com). When I try the function "Dig" on https://toolbox.googleapps.com/apps/main/, it returns the wrong IP address for "my-domain.com". I am assuming it is returning one of GoDaddy.com IP with the "my-domain.com is parked free", but it is definitely not the elastic IP that I selected for my AWS EC2 instance.
I solved my problem and I can now correctly access my API on "my-domain.com"
As it turns out, the tutorial I shared initially as part of my question is incomplete and partly outdated I think: there is some configuration required on AWS using the service "Route 53". There is an excellent tutorial on Youtube to guide you through the steps. I followed it and it solved my issue.
In a nutshell: when you open "Manage DNS" on GoDaddy.com, you have to enter custom name servers which are given to you by the AWS console after a bit of configuring.

Xampp with Aws issue

I am using an Aws EC2 with Ubuntu, I installed Xampp and it is working fine, the problem that I have it's that if I put this url:
xellin.com
It will open the Xampp dashboard... if you check this url too:
http://xellin.com/akivoy/
You will see that there is a website, I wonder how can I do if I put xellin.com it diplays what it's in xellin.com/akivoy?
Is it possible? Thanks!
If xellin.com is your domain, you need to associate it with the elastic IP address of your EC2 instance. It is the only way in which DNS systems will know how route/propagate traffic to your instance.

AWS hosted website not working, what would be the problem?

please advise me.
I am no developer and very new to this. Our website is down and it keeps showing the following error:
This site can’t be reached
The connection was reset.
We are using AWS.
It keeps happening every few weeks. I tried redirecting it on AWS to a different website, for the time being, that didn't work either.
Any help is appreciated
If the website is hosted in EC2 instance
Check if your EC2 instance is having the same ip as earlier if it doesn't have a elastic ip associated with it chances are any restart of that ec2 instance might have changed the public ip address.
If above is same as earlier check the security group if it allows traffic on port 80 and 443 ( if using ssl )
And most importantly check if your website is indeed running i.e check with IP address in web browser i.e http://<ip_address>:<port>/ or https://<ip_address>:<port>/

Ubuntu Server working from public IP but not through Godaddy DNS record

So the ubuntu server I'm using for a webserver is acting fine when I try to ssh or view the page using it's public IP. However when I try to use the record I just created in GoDaddy it wont work. I am trying to set up a subdomain and it won't work at all. I just had the exact same setup working on Amazon's OS but I saw too many negative reviews of the distro. So I spun up some instances running ubuntu and immediately they aren't working.
I have the record set to type:'A' and the name and value are definitely set correctly.
What else should I check? I'm not sure where the error is here because the godaddy setup is so simple. I feel like it has to be in my setup of the EC2 instance or some other aws settings.
If you can access the site via public IP and you are sure that the A record config is fine, I think the dns is still being propagated. Dns propogation may take longer.
If that's the case, Give it some time.
You can check which part of world knows about your new cname on https://dnschecker.org/. There are many other sites as well.

Amazon Route53 domain not linking to Lightsail

I'm a complete newbie to networking so bear with me. FYI I am using the pre-bundled Ubuntu 16.04 instance on Amazon Lightsail. I am building a Django project.
I have a domain registered on Route53 that I am trying to link to my Lightsail project. I created a DNS zone and static IP following the Lightsail docs. Then I created the appropriate A and NS records in the Hosted Zone in Route53.
But when I run the Django server from the command line, using port 0.0.0.0:8000 (after doing sudo ufw allow 8000), I cannot connect to bungol.com:8000. I used this website to check if bungol.com is correctly linked but it seems there is no ip address attached to the domain.
So I have 2 questions:
Firstly, why is this not working?
Secondly, how do I go about troubleshooting such an issue? There are so many things here that could have caused the issue and I'm clueless as to how I should start solving the problem.
Answer, you did everything correctly.
How long did you wait after configuring your DNS records? Your screenshot does not show the TTL values, but you would have to wait at least that long usually.
I just went to your site www.bungol.com and it works. The IP address 19.221.198.143 matches based upon a ping.
There is some conflicting information in the docs (see discussion). The trick is to use Lightsail only to set up a static IP and use that IP for the A record on the Route53 side.
No need to set up a DNS zone in Lightsail or deal with its nameservers.