Linux: ports state for active internet connections

Easy
sudo netstat -atpn
Or check exact app by name
sudo netstat -atpn | grep -i nginx