Elastic IP stopped working - 2 websites (domain and subdomain) in 1 EC2

0

Hi, I must start with explaining that I'm self-thought regarding things here in AWS so I would appreciate if you could try to provide some beginner level answers.

I have one Ubuntu EC2 instance, and I have 2 laravel websites in it (one site for testing, the other for dev). Following some youtube tutorials I wanted to assign the main domain (site.com) to one site and a subdomain (dev.site.com) to the second one. I tried to do so with Elastic IPs. It worked fine for about a month, and today while doing some work the subdomain stopped working showing "This site can’t be reached dev.site.com refused to connect. ERR_CONNECTION_REFUSED".

I tried reaching to the Elastic IP only and it redirected me to the site, but after attempting login it returned to same error.

In Route 53 I only have 1 hosted zone, and inside I have all the main domain config and added one type A record for the subdomain that redirects to the Elastic IP.

The site that uses the main domain is working fine, no issues and I can connect to the Instance too.

What can I do to fix this? I need to have the 2 websites in this one EC2 instance, and I want to use subdomains.

Valeria
已提問 1 年前檢視次數 232 次
1 個回答
0

Am I correct in understanding that you are setting up virtual hosts in your web server configuration?
Have you checked the web server access logs and error logs when you accessed the web site?

profile picture
專家
已回答 1 年前
  • Yes, I actually set the virtual hosts a month ago and everything was working fine. Not sure what changed.

    Access and error logs don't show anything weird. No visible errors from the site

  • If there is nothing in the logs, the web server configuration may be OK. Does this occur even if I change the terminal or access source from which I access the site?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南