I have a web application running on Apache/Tomcat on a cloud with Linux (Digital Ocean). It had a domain name - example.com
. I've encrypted both example.com
and www.example.com
using Let's Encrypt and now requests to https://example.com
and to https://www.example.com
work.
Then I wanted to redirect HTTP requests to HTTPS. But noticed that for some reason requests to http://example.com
and to http://www.example.com
do not work, and I'm not getting any response from my server. I tried to play with Apache configuration files of VirtualHost
, but nothing worked for me so far.
Using tcpdump
I see that I am receiving requests on port 80 on the server, but nothing happens except that.
What might be the reason for requests to HTTPS to work while requests to HTTP not to work?
Thanks.
Well, if someone else encounters this behavior - the reason for it was the firewall - port 443 (used by HTTPS) was open but port 80 (used for HTTP) was simply closed. Opening it solved it.