Chapter 14. Problems with configuring IP-aliasing with Apache.

How do I enable IP-aliasing for SWS?

First of all you have to make sure that IP-aliasing is built into your running kernel. See the kernel docs or the IP-aliasing HOWTO from the LDP for this. Next you've got to make sure that DNS is setup correctly and finally you ensure that your /etc/httpd/conf/httpd.conf file has the correct settings for the domain you want to alias.

A sample config for this would look like so:

             
   <VirtualHost www.smallco.com>
            
   ServerAdmin webmaster@mail.smallco.com
            
   DocumentRoot /groups/smallco/www
            
   ServerName www.smallco.com
            
   ErrorLog /groups/smallco/logs/error_log TransferLog
            
   /groups/smallco/logs/access_log 
            
   </VirtualHost>
            
   <VirtualHost www.baygroup.org>
              
   ServerAdmin webmaster@mail.baygroup.org
             
   DocumentRoot /groups/baygroup/www
            
   ServerName www.baygroup.org
           
   ErrorLog /groups/baygroup/logs/error_log TransferLog
          
   /groups/baygroup/logs/access_log 
            
   </VirtualHost>
          

It is recommended that you use an IP address instead of a hostname for IP-aliasing.