@zerlpaMMT, then for me it is a firewall/route issue.
Please, paste the output of this command (as root):
iptables --list-rules
Please, when pasting the output of commands here on the forum, paste the output, select the pasted text and click on icon </> so the output won’t be formatted.
The iptables config doesn't accept connections to 443, well you see these rules...
-A ufw-user-input -p tcp -m tcp --dport 443 -j ACCEPT
-A ufw-user-input -p udp -m udp --dport 443 -j ACCEPT
...and you think, great, it allows connections to port 443 but these rules are never reached because there is another rule before these ones rejecting the connection:
-A INPUT -j REJECT --reject-with icmp-host-prohibited
The reason the connection to port 22 and 80 works is because there are rules allowing them before this REJECT rule on INPUT chain.
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
@zerlpaMMT So, yes, the problem is the firewall. You can check it easily, remove the reject rule:
@zerlpaMMT you are welcome but keep in mind, if you reboot your server you will have the same problem because you have the wrong rules defined on ufw. The deletion I suggested is a temporal “fix”, indeed it’s actually like you do not have a firewall because your default policies are ACCEPT.
So as I said you should reset your ufw rules and start a fresh conf.
@zerlpaMMT glad you got it working. As @sahsanu said once you reboot you will probably lose those rules. If you want a basic set of ipv4 and ipv6 rules for running a web server and a guide to making them persistent let me know.