I recently set up a new site on AWS EC2 instance. It works fine from the office, but when I go to the site from my phone it hangs and then times out. I'm new to AWS, so maybe I missed something during the setup. It's a basic lamp stack. Nothing in the logs. I don't think requests are even getting to the server. Any suggestions appreciated.
Thanks.
The issue from your question and comments is that you do not have http port 80 open to public. Please add below rule to your EC2 security group and your website will work everywhere.
Related
I'm trying to find a solution for my below explained scenario i.e.
I created an aws ec2 instance for the running my MERN app, but I want to run both front-end and back-end with same ip i.e. on same ec2 instance, so to do that I create security group with different ports and my app started working
but I started facing a issue with creating a subdomain for those ip+port e.g. xx.xxx.xx.xxx:3000 for running backend as shown below, the dns setting says I cannot create a subdomain with ip+port I can create it with ip only (that I have create for my front-end and it's running)
I wanted to create a subdomain for my back-end as to give it the access for google oauth2, because if I use the ip+port e.g. 0.0.0.0:3000, to be given access in google console it doesn't allow to do that as shown below
I searched so many article and blogs for the solution but didn't find anything helpful related to the topic, but I got some mentions of htaccess configurations with which I can host multiple website using same ip, I don't know about it even I'm very new to the server setup doing it first time by myself, need some guidance or solution to this, if anyone can provide me any solution or reference to any solution, it will be very helpful for me, thanks in advance
I use a VPN to access services in an AWS VPC. I also use this VPN as a gateway to my local internet. The strange thing is that when I'm connected to the VPN, I can't browse amazon.com or amazon.co.uk I can get to the home page and it displays correctly, but whatever I try to do, I get an error 503 - Service Unavailable:
"We're sorry
An error occurred when we tried to process your request.
We're working on the problem and expect to resolve it shortly. Please note that if you were trying to place an order, it will not have been processed at this time. Please try again later.
We apologise for the inconvenience."
Again, this is Amazon's retail/shopping website.
It works fine with the VPN disabled.
What can I do to get this fixed?
Thanks!
It appears that amazon.com prevents access to the IP address range used by Amazon EC2 instances. This is possibly done to prevent scraping of information.
I accessed a page via an EC2 instance and noticed this message as a comment in the beginning of the HTML page:
To discuss automated access to Amazon data please contact api-services-support#amazon.com.
For information about migrating to our APIs refer to our Marketplace APIs at https://developer.amazonservices.com/ref=rm_5_sv, or our Product Advertising API at https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html/ref=rm_5_ac for advertising use cases.
In fact, I have seen this behaviour on many websites.
While this does not assist with your use-case of sending traffic via your VPN connection to the Internet, at least it explains why it is occurring.
I want to connect Google Cloud Platform Hosting to my Domain and Have tried everything.
I installed Wordpress from the Marketplace, then enabled Google Cloud DNS API, then also Cloud DNS from Network Services, and also changed the dns name from my domain name provider but my domain name does not open.
When I put my URL in the search bar, I see API request and CPU usage - https://prnt.sc/n7d5av . But My site does not open. It shows this - http://prnt.sc/n7d601
Please help me, I am stuck from past 12 hours and now my head feels like it will burst out. I did the exact process five times and nothing helps.
It looks pretty much like the firewall is blocking your port 80.
Make sure you add a firewall rule allowing to access your particular IP to everyone as it is described here.
This other documentation of Bitnami is quite clear as well.
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.
i've registered a .com domain name. At the Amazon Web Services account i own, I have already set up the DNS zone,i've changed the nameservers at my registrar's panel and i've created an A-record in my AWS DNS zone,too. I think i've done all the preparation needed. But my website is not opening!
This is not a DNS propagation time-requiring issue,by the time i did all the above stuff about 5 days ago (DNS had enough time to be refreshed globally in any ISP). Also via ipduh.com i can see that all the nameservers are correctly configured and recognised, as well as the *.mydomain.com A record which points at my AWS instance's IP.
What possibly would be wrong guys? :/ i've done anything i know and i've followed also the directions i've found in SO and i had no luck till now :/
Any suggestion and help would be highly appreciated :D
Thank you in advance guys!
I'm going to assume that the DNS is set up properly, and that the A record is pointing at the IP address assigned to your instance.
If this is a new AWS account, you're probably running in a VPC. Did you make sure that you allocated a public IP address to the instance? If your IP is 10.something, that's the internal, private IP address and you won't be able to use that. You'll need to allocate an Elastic IP and associate it with your instance, then update your DNS settings.
Next, make sure that the web server is up & running? If you log into the instance, what happens if you wget localhost? You might not get the page you're expecting if you're running multiple name-based virtualhosts, but you should get the index page for the default web site.
OK, so how you're sure the web server is running. Next thing to do is check the security rules. When you created your instance, you had give it the name of a security group. The default is, strangely enough, called "defaut". Take a look and see if port 80 is open. If not, open it up to the world (0.0.0.0) and see if you can access the web site now.
None of this helps? Reboot your instance and see if it starts working when it comes back up - it's possible that you're on a bad host, and rebooting will bring it up on different hardware.