< Previous Challenge - Home - Next Challenge>
A managed instance group uses an instance template to create a group of identical instances. Use these to create the backend of the HTTP Load Balancer.
Add a network tag named allow-health-check
NOTE: The network tag allow-health-check ensures that the HTTP Health Check and SSH firewall rules apply to these instances.
NOTE: Make sure to type a space or press tab after typing the tag name, otherwise it might not get set.
#! /bin/bash
sudo apt-get update
sudo apt-get install apache2 -y
sudo a2ensite default-ssl
sudo a2enmod ssl
export vm_hostname="$(hostname)"
sudo echo "Page served from: $vm_hostname" | \
sudo tee /var/www/html/index.html
For your instance group, set port 80 as a “named port” port. This allows the load balancing service to forward traffic to the named port.