Issue
Was setting up a simple website for fun/practice on Ubuntu 18.04, using Apache2 as the web server. I then wanted to work on another website, so I thought I would work on it through a different port than the one for the first (443/HTTPS), and tried it with a random port 8081.
For some strange reason, I couldn't get it to work. I checked the access logs for my instance from AWS, and the requests via port 8081 were getting in, but the web server was not responding.
TL,DR; (Solution)
Turns out I had set up a separate firewall within the Ubuntu instance that I had completely forgotten about.
Once I figured that out, fixing it was easy: sudo ufw allow 8081
If you try troubleshooting firewall issues with AWS instances, most of the guides/ knowledge online tells you to look at the settings in AWS, since those should be the only ones that matter.
But if you're like me and followed Apache tutorials that told you to set up a firewall within the server, and then you just forgot you did that, chances are you might've forgotten that you need to edit those firewalls.
So I wrote this as a friendly reminder that this might be something you have to check, since I didn't see it anywhere else :)