Letsencrypt successfully install in ubuntu but not redirection to https

Try:
restarting Apache service
restarting the entire server

Done.
still get the same error.

Is there a “Back-end server” ?

i don’t know. its hosted on AWS and OS is ubuntu18.04 LTS

What does top show?
[is it low on resources]

How many established connections are there?
netstat -pant | grep ESTABLISHED

Did you fully stop and start apache?
systemctl stop apache2
systemctl start apache2

Yes

Try removing the code we added.

Do you recognize the last two connections?
Both foreign addresses are private IPs 172.31.x.x
I find that very strange; as that implies they are connecting directly from within AWS system (not the Internet).

1 Like

No.i dont recognize.

1 Like

Are you familiar with the AWS firewall?

Did you remove the code we added?
[I don’t think that will change anything but we must rule that out]

1 Like

No.

yes now removed.

1 Like

The code WAS part of the problem !

hmm…

1 Like

yes but the website still not redirecting to HTTPS

1 Like

You need to familiarize yourself with the AWS firewall (when you get a chance - not right now).

As for the redirect code…

Let’s try a very simple one line first:
redirect / https://3mad.in/

put that after the second domcumentroot

1 Like

yeah sure.

done

1 Like

Remove the line.
I see the same problem again:

curl -Iki 3mad.in
HTTP/1.1 503 Service Unavailable: Back-end server is at capacity
Connection: keep-alive
1 Like

done

1 Like

This “apache” is acting very strange…

Let’s follow these steps:

1: Enable mod_rewrite
sudo a2enmod rewrite
2. Restart apache
3: Insert redirection code
[either one will do for this test]

1 Like

Module rewrite already enabled

1 Like