Cannot see the Gatsby website running on AWS EC2 Ubuntu server, externally - amazon-web-services

I am trying to see the website running with Gatsby on AWS EC2 Ubuntu Server.
Locally website is successfully running with gatsby develop
I currently have no domain name purchased such that just want to check if the site can be accessible externally.
without using surge command, just want to check the website externally.
Security groups on AWS EC2 is appropriately configures (Inbound's HTTP/HTTPS are allowed)
In rails I recollect with passing additional parameters it can be accessed externally,
how it works on gatsby? any ideas?

Ah sorry guys the issue solved.
I used surge with surge public but when i put in the arbiterary domain name it did not work.
when I left the temporarily domain name provided by surge and also, after I verified my email address, it works fine.

Related

Request to an Ec2 instance return 403 after configure an elastic IP

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.

IIS 10 server hosted on AWS will not serve aspx

Have an app that has been running for years using on-premise and virtual systems. It's an ASP.NET application. Stood up a VM on AWS running server 2019 configured identical to another VM running on different provider. The instance of IIS running on AWS VM will not serve up the site. The non AWS server was running server 2016 so i created a new VM on AWS using server 2016. Get the same identical problem.
If i load a dummy html page (typical hello world) the page comes up fine, so i know it's not a DNS issue or anything like that.
when I looked at the logs in IIS i see a 302 status code. for the life of me I can't figure out why this thing won't serve up the site. I check all the extensibility, etc. I have configured the IIS on both systems identically. AWS says it's an IIS issue. How is that possible if it is configured exactly the same?
If it was an application issue wouldn't we see a 500 error?
Looking for any ideas.
thanks.. FYI this is critical at this point. Trying to migrate a customer on AWS.
Turns out that AWS has https turned off by default, so you have to add a rule to the lightsail firewall to allow https traffic to get through. who would have thunk it?

how to add a website to aws ec2 instance, no target

I've a nice little ec2 instance, I've logged in the console, updated the YUM, started the httpd, but the IP doesn't work in the browser.
my httpd is up on chkconfig: httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Thought it would be as listed on my connect from public DNS, same as I connect to console through. I've used the S3 server into the properties on the instance and enabled static website hosting, just to test it before using PHP. Even created a like bucket, trying to use my domain name from the Route 53, but the Route 53 also shows "No Targets Available" in the S3 (or any other).
Alrighty, found it. Was a security issue, but here is the process, in two quick url's.
Tutorial: Installing a LAMP Web Server on Amazon Linux
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html?shortFooter=true
But it says if it doesn't work, check the security groups, and a couple of clicks later you're looking at this.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-rules-reference.html?shortFooter=true
Go into the security group settings and add http from pull down and it's done.
Also, the second part where there isn't a target, be sure and associate the elasticIP (created in the AWS services console) and sure enough a web server is up and running. Once you've the elasticIP address simply add it to the route 53 rule set(s).

Information on how to public a website

It's the first time I will be publishing a website and have no idea on how this works.
Here's a few details on what I'm trying to achieve.
I have created a sample website in nodejs and uploaded it to docker (two containers, one for nodejs and the other one for mongodb database)
Now I would like to upload this on aws but not really sure where to start and what I need to know.
In addition, I want a domain, the price is quite high for the .com domain I am looking.
My questions are as follow:
If I buy a domain, how do I hookup the domain so it's routed to the aws server where I have my website deign, logic and database, how exactly does this work?
What's the best way to buy a domain? does anyone have any experience and advice on the best approach?
Thanks
You'll need to setup your vm and begin hosting your site w/ the custom ec2 URL, then configure the Amazon dns server (Route 53) with your domain to point at the correct vm.
Step 1
Get an ec2 box running (whatever size you think you'll need for traffic/storage). When you go through the portal, you'll need to Authorize Inbound Traffic.
Now you can sign into your ec2 vm, download any dependencies you'll need (npm for instance) and run your site just like you would locally in a terminal. Here's a sample that may help if you have trouble.
Step 2
You now need to the dns servers to translate the domain you owned into the ip of your ec2 vm. You can use the Route 53 service to do this.
Alternatives
You can also use Azure's App Services to do this. It's a cloud app hosting service that's meant to help you get your app on the cloud and scale it without much trouble. Here's a Node.js Sample.
...And here's the instructions on how to setup a custom domain.

Questions Regarding Hosting a dynamic website on Amazon EC2

So i have developed a dynamic website using Eclipse.
I have set up an instance of Amazon EC2 , i have installed Apache Tomcat 7 and MYSQL on it. Using the Apache Tomcat menue by going to publicDns:8080 i have deployed the war file as well.
The project name is sms.
It works perfectly fine when i visit the site using publicDNS:8080/sms
Now i have created an elastic Ip address and associated it with the instance
I have also pointed my domain to the Ip Address
Now i want that when ever i visit this address it should take me to the index of my deployed website.
Right now i am working with the Ip Address since my domain is still configuring
so what i want is when i visit my Ip Address it should take me to the index of the website
instead what i have to do now is
IpAddress:8080/sms
going to IpAddress alone shows me Unable to Connect Error
How do i configure my EC2 Instance so going to the IpAddress would take me directly to the index
Well this is how i solved the problem
First i renamed by war to ROOT.war , then i deployed it using the normal method from the Manager section of apache home (domainName:8080/manager). Then using putty i connected to my amazon EC2 cloud and navigated to the apache folder, and changed the default port from 8080 to 80.
So now going to the domain name takes me to mywebsite