Quick overview of virtual hosts and a touch of frenetic off-screen debugging!
Samples: https://httpd.apache.org/docs/2.4/vho...
How to: https://www.digitalocean.com/communit... (step 4)
Note: if you haven't already, don't forget to open the SSH port when you enable ufw, otherwise you can get locked out of your virtual machine! sudo ufw allow 22
Fixes (after getting the example site working):
1. Open port 8080 on local machine (sudo ufw allow 8080)
2. Update Apache config to listen to 8080
/etc/apache2/ports.conf
Add: "Listen 8080" to the file (add a line under "Listen 80" -- no quotes)
3. Update the Google Cloud firewall:
Search for 'Firewall' (or go to VPC networks then Firewall).
Pick the default http rule and add 8080 to the allowed ports. (comma-separated)
4. Don't forget to reload Apache!