The latest version of Apache is version 2.2. This package is available as an option from your previous install of the Debian OS. You will use the CLI to install.
If needed, change the VM network configuration to use DHCP, then restart the VM (or just the NIC)! You could use the script file you created above to do this.