In this Video, I have shown how to create External Proxy Network Load balancer.
SSL Proxy LB Startup Script
===============================
#! /bin/bash
sudo su
apt-get update
apt-get install apache2 -y
a2ensite default-ssl
a2enmod ssl
vm_hostname="$(curl -H "Metadata-Flavor:Google" \
[ Ссылка ])"
echo "Page served from: $vm_hostname" | \
tee /var/www/html/index.html
systemctl restart apache2
===============================
TCP Proxy LB Startup Script
===============================
#! /bin/bash
sudo su
apt-get update
apt-get install apache2 -y
sudo sed -i '/Listen 80/c\Listen 110' /etc/apache2/ports.conf
vm_hostname="$(curl -H "Metadata-Flavor:Google" \
[ Ссылка ])"
echo "Page served from: $vm_hostname" | \
tee /var/www/html/index.html
systemctl restart apache2
===============================
Ещё видео!