Solution:
- Shut down the virtual machine
- on the menu bar go to Virtual Machine > Settings > Add Devices
- Create a new Network device, set configuration to "Private to my Mac" under Custom, and generate a MAC address.
- Start up Ubuntu and Apache2 server
- In the settings app, and under network there should be more than one connection. Click the gear icon for each connection until you find the one with a matching MAC address. Copy the IP Address somewhere.
- Follow this tutorial to change the IP Address to a static one (in the netplan file, use the IP address copied in the step above). This will make the IP address stay the same.
- Entering the IP address in the host should take you to Apache's test page.