This article explains UFW and hows how to use it on Ubuntu.
This article explains how to configure NMAP on a linux server.
This article explains how to configure VirtualHost files for Apache on Ubuntu 18.04.
This article explains how to work with UFW, a Linux Firewall, and how to list active and inactive rules.