What should a name based VirtualHost directive look like?

There are two parts to this. The first one is that you must issue a directive which gives Apache an IP address to serve the name based domains from. Like this:

            
   # If you want to use name-based virtual hosts you need to define at
           
   # least one IP address (and port number) for them.
           
   #
           
   NameVirtualHost 12.34.56.78:80
          
   NameVirtualHost 12.34.56.78
            

The second part is then to add the VirtualHost directives for each domain. Like this:

            
   # VirtualHost example (name based):
             
   # Almost any Apache directive may go into a VirtualHost container.
                
   #
              
   <VirtualHost name.of.host.some_domain.com/>
              
   ServerAdmin webmaster@host.some_domain.com
              
   DocumentRoot /www/docs/host.some_domain.com
              
   ServerName host.some_domain.com/
             
   ErrorLog logs/host.some_domain.com-error_log
            
   CustomLog logs/host.some_domain.com-access_log common
         
   </VirtualHost>