WiBisode: Web Server Load Balancer With Apache

Опубликовано: 29 Апрель 2026
на канале: Kevin WiBit
1,807
17

Welcome back to the first WiBisode for quite some time! I'll explain the horrific and traumatic emotional journey I had to overcome in order to bring myself back from the ashes to make another one (I'm kidding, of course).

This video has it all. Humor, a huge amount of sarcasm, and some education. We are going to have a little bit of fun with some mean YouTube commenters from the “Mac OS X El Capitan DiskUtil Partitioning” WiBisode (   • Mac OS X El Capitan DiskUtil Partitioning  ) where some folks don't like my commentary style, which is fair criticism.

But, that's not what we're here to talk about! That's the side show!! We want to make a HTTP load balancer so that YOU can provide better performance for your web applications.

I recommend you watch the video (I'll put a comment where the video starts if you don't want to partake in the tomfoolery), and the commands you will need are also listed below along with the markup you'll need to put in your Apache configuration files.

Good luck! Please feel free to comment with any hate, love, or questions.

--------------------------------------------
After creating your web server run these commands
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install apache2 -y
sudo apt-get install php -y
sudo a2enmod rewrite
sudo a2enmod ssl
sudo mkdir /etc/apache2/ssl
sudo openssl req -x509 -nodes -days 7300 -newkey rsa:4096 -subj "/C=US/ST=State/L=City/O=Company Inc/CN=company.com" -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt
sudo nano /etc/apache2/sites-available/000-default.conf
--------------------------------------------
Delete all data and paste the following into 000-default.conf
--------------------------------------------
PAUSE THE SCREEN AND TYPE THE TEXT INTO THE CONFIGURATION. YOUTUBE WILL NOT LET ME PUT THE MARKUP INTO THE DESCRIPTION TEXT. SORRY!
--------------------------------------------
sudo nano /etc/apache2/sites-available/default-ssl.conf
--------------------------------------------
Delete all data and paste the following into default-ssl.conf
--------------------------------------------
PAUSE THE SCREEN AND TYPE THE TEXT INTO THE CONFIGURATION. YOUTUBE WILL NOT LET ME PUT THE MARKUP INTO THE DESCRIPTION TEXT. SORRY!
--------------------------------------------
sudo rm /var/www/html/index.html
sudo nano /var/www/html/index.php
--------------------------------------------
Paste the following into index.php
--------------------------------------------
PAUSE THE SCREEN AND TYPE THE CODE INTO THE PHP SCRIPT. YOUTUBE WILL NOT LET ME PUT THE CODE INTO THE DESCRIPTION TEXT. SORRY!
--------------------------------------------
sudo a2ensite default-ssl
sudo service apache2 restart
ifconfig
--------------------------------------------

Complete this process for all of your servers and make sure you can hit them using their IP address in a web browser.

After this is done, whichever server has been selected as your load balancer perform the following (I'm expecing that it is exactly the same as the other web server(s) configuration documented above)
--------------------------------------------
Run these commands
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests
sudo a2enmod proxy
sudo a2enmod proxy_http
--------------------------------------------
sudo nano /etc/apache2/sites-available/default-ssl.conf
--------------------------------------------
Delete all data and paste the following into default-ssl.conf
--------------------------------------------
PAUSE THE SCREEN AND TYPE THE TEXT INTO THE CONFIGURATION. YOUTUBE WILL NOT LET ME PUT THE MARKUP INTO THE DESCRIPTION TEXT. SORRY!
--------------------------------------------
sudo service apache2 restart


You should be done!!!!!

#WiBisode #LoadBalancer #Apache #WiBitNet