Ok. I figured it out I think. The reason why
www.b.com wasn't working is because it wasn't defined in the hosts file (/etc/hosts/hosts.conf). When the template for /etc/httpd/conf/httpd.conf was expanding, the perl script would not find the entry for
www.b.com therefore it would not show up in the httpd.conf file when /etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/03ServerAlias looked through the configuration database for it. I didn't fix this by going to the server-manager but by using the command prompt. Here is what I did, I hope it's ok because it seems to be working.
1. Look through the hosts file with db hosts show | grep b.com (no entries were found because it wasn't created with the domains panel in server manager).
2. Figure out what properties were needed by using db hosts show | grep a.com (a.com being the primary domain).
3. Make entries into the hosts database by issuing db hosts set
www.b.com host HostType Self
4. Expand template with expand-template /etc/hosts followed by signal-event host-create
5. Expand apache template with expand-template /etc/httpd/conf/httpd.conf
6. Restart apache (I do both) sv restart httpd-e-smith restart and /etc/init.d/httpd-e-smtih restart
Now when I go to
www.b.com or b.com I get the correct virtual host. The a.com and
www.a.com addresses remain unaffected and the virtual hosts section of b.com for port 80 and 443 both contain the ServerAlias entry
www.b.com.
Please correct my terms and understanding if I missed something.