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.

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
전문가
답변함 일 년 전
  • 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?

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠