Solved the phenomenon that "Response time is too long" in the original domain even though the IP address and EC2 address can be entered in the site.

environment

Mac EC2 ELB Route53 ACM (https) Amazon Linux2 unicorn Nginx Capistrano

Suddenly I can't enter the site of my own domain!

Origin

The https: // site under development, which was normally displayed until now, suddenly disappears, and the response time is too long. It stops at the screen </ b>.

Confirmation

First, you need to identify whether the cause is the server, the domain, or the browser.

① → Check if the server (EC2) is running I tried to see if it can be displayed with the public IPv4 address </ b> or public IPv4 DNS </ b> described in the instance of AWS EC2, but it is displayed here, so if there is a problem with the server or browser It turns out that the only problem is how to pass the domain.

② → In the terminal, enter % dig ○○ .com </ b> (← original domain) or % dig ns ○○ .com </ b> and check if ANSER is returned, ANSER will be displayed. Since it is returned, there is no problem with the domain publisher.

③ → There may be something wrong with HTTPS in the network, so check the load balancer (ELB) where the certificate is applied by ACM (the source of https communication), and restrict communication. What to do is Security group inbound rule </ b> → https source is My IP * Or custom IP address is specified 2ce6c750f6fa48f08ba3cdb75ecc8ca0.png

Solution

Since the security group of the load balancer was the IP address of my home, I could not enter the site when I moved the wifi connection location. If you change the source to "anywhere", it will be 0.0.0.0/0, so it was possible to display the site without limiting the connection destination.

reference https://teratail.com/questions/220615