The lab for this week, we want to set up a virtual hosts for a web server. We want the web server to different pages for different IP addresses and to have two server names set up for a single IP address where each server name will have different web pages served.
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.95 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1 auto eth0:0 iface eth0:0 inet static address 192.168.1.105 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
NameVirtualHost 192.168.1.95 <VirtualHost 192.168.1.95> ServerName ptroy.it202.com DocumentRoot /var/www/ </VirtualHost> <VirtualHost 192.168.1.95> ServerName pat.it202.com DocumentRoot /home/pat/www/ </VirtualHost> <VirtualHost 192.168.1.105> ServerName kevin.it202.com DocumentRoot /home/kevin/www/ </VirtualHost>
This lab assignment is to done in the lab in SEL 2264.