This is the weirdest thing ever. I've configured my AWS Elastic Beanstalk environment's proxy server setting to none instead of nginx or apache, to reduce the server overhead, and since I don't need the caching.
However, the most peculiar thing happened. The server is able to accept connections on port 80 and forward them to my Node.js app running on 8080, even though no service is apparently listening on port 80! I verified with the following commands:
sudo lsof -i :80- no output
sudo iptables -L- no forward rules
sudo netstat -an | grep :80 | grep LISTEN- no processes listening on port 80
curl http://localhost/ on the actual server works, so this is not a case of tricky Elastic Load Balancer forwarding rules.
How does AWS do it? How do they forward traffic without a process listening on
:80 or an iptables forward rule?