Apache Virtualhosts in a simple fashion on RHEL

Step 1: Configure Apache to Listen on each of the ports you want to service.

Step 2: Set up a Virtual Host configuration for each port you want to service.

To Expand, add to httpd.conf

Listen 80
Listen 81
Listen 82

# Listen for virtual host requests on all IP addresses
NameVirtualHost *:80

<VirtualHost *:80>
DocumentRoot /var/www1
ServerName www.example1.com
</VirtualHost>

NameVirtualHost *:81
<VirtualHost *:81>
DocumentRoot /var/www2
ServerName www.example2.org
</VirtualHost>


NameVirtualHost *:82
<VirtualHost *:82>
DocumentRoot /var/www3
ServerName www.example3.org
</VirtualHost>