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 Answer
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
EXPERT
answered 9 months ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions